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 -- To view, visit https://gerrit.wikimedia.org/r/80330 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia5c578e4a0cfcc3f80092c4496b48474cf95ee06 Gerrit-PatchSet: 2 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Legoktm <[email protected]> Gerrit-Reviewer: Ladsgroup <[email protected]> Gerrit-Reviewer: Merlijn van Deen <[email protected]> Gerrit-Reviewer: jenkins-bot _______________________________________________ Pywikibot-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits
