Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/80330


Change subject: Make ItemPage.editEntity() functional for creating a new item
......................................................................

Make ItemPage.editEntity() functional for creating a new item

Change-Id: Ia5c578e4a0cfcc3f80092c4496b48474cf95ee06
---
M pywikibot/site.py
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/30/80330/1

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: newchange
Gerrit-Change-Id: Ia5c578e4a0cfcc3f80092c4496b48474cf95ee06
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to