http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11680
Revision: 11680 Author: legoktm Date: 2013-06-21 18:23:31 +0000 (Fri, 21 Jun 2013) Log Message: ----------- Account for breaking change in API ([[gerrit:68406]]) by passing new parameter if ID was empty
Modified Paths: -------------- branches/rewrite/pywikibot/site.py
Modified: branches/rewrite/pywikibot/site.py =================================================================== --- branches/rewrite/pywikibot/site.py 2013-06-21 18:18:10 UTC (rev 11679) +++ branches/rewrite/pywikibot/site.py 2013-06-21 18:23:31 UTC (rev 11680) @@ -3377,6 +3377,8 @@ @must_be(group='user') def editEntity(self, identification, data, bot=True, **kwargs): params = dict(**identification) + if not params: # If no identification was provided + params['new'] = 'item' # TODO create properties+queries params['action'] = 'wbeditentity' if bot: params['bot'] = 1
pywikipedia-svn@lists.wikimedia.org