https://bugzilla.wikimedia.org/show_bug.cgi?id=64496
Bug ID: 64496 Summary: remove aliases with editAliases() Product: Pywikibot Version: core (2.0) Hardware: All OS: All Status: UNCONFIRMED Severity: normal Priority: Unprioritized Component: Wikidata Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: akkakk_bugzilla@yahoo.de Web browser: --- Mobile Platform: ---
editLabels and editDescriptions remove labels/descriptions when they are set to "" (empty string). editAliases should do the same when aliases are set to [] (empty list).
https://bugzilla.wikimedia.org/show_bug.cgi?id=64496
--- Comment #1 from akkakk_bugzilla@yahoo.de --- code to (not) reproduce:
#!/usr/bin/python # -*- coding: utf-8 -*- import pywikibot site = pywikibot.Site("wikidata", "wikidata") repo = site.data_repository() q = "Q292753" item_obj = pywikibot.ItemPage(repo, q) content = item_obj.get() aliases = content['aliases'] aliases['als'] = [] item_obj.editAliases(summary=u"remove redundant aliases", aliases=aliases) #Q292753 did not change
pywikipedia-bugs@lists.wikimedia.org