Nemo_bis created this task. Nemo_bis added a subscriber: Nemo_bis. Nemo_bis added a project: Pywikibot-Wikidata. Restricted Application added subscribers: Aklapper, pywikipedia-bugs.
TASK DESCRIPTION When I do something like ``` item = ItemPage(self.repo, '-1') item.editLabels({uselang: title}) item.addClaim(claim, bot=True) ``` (just assume the variables are defined, see https://gerrit.wikimedia.org/r/#/c/166629/14 for context), I get:
``` site.py", line 5629, in addClaim if claims in item and claim.getID() in item.claims: NameError: global name 'claims' is not defined <type 'exceptions.NameError'> ```
Shouldn't that if check for existence of "item.claims"?
TASK DETAIL https://phabricator.wikimedia.org/T94848
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Nemo_bis Cc: pywikipedia-bugs, Nemo_bis, Aklapper