jenkins-bot has submitted this change and it was merged.
Change subject: Make ItemPage.editEntity() functional for creating a new item ......................................................................
Make ItemPage.editEntity() functional for creating a new item
Patch: https://sourceforge.net/p/pywikipediabot/patches/611/ Change-Id: Ia5c578e4a0cfcc3f80092c4496b48474cf95ee06 --- M pywikibot/site.py 1 file changed, 2 insertions(+), 0 deletions(-)
Approvals: Ladsgroup: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/site.py b/pywikibot/site.py index bca3feb..ef00047 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -3419,6 +3419,8 @@
@must_be(group='user') def editEntity(self, identification, data, bot=True, **kwargs): + if "id" in identification and identification["id"] == "-1": + del identification["id"] params = dict(**identification) if not params: # If no identification was provided params['new'] = 'item' # TODO create properties+queries
pywikibot-commits@lists.wikimedia.org