FelixReimann has uploaded a new change for review. https://gerrit.wikimedia.org/r/119949
Change subject: (bug 62916) Only add hash if it is not None. ...................................................................... (bug 62916) Only add hash if it is not None. A newly created Claim seems to have claim.hash=None now. This leads site.py to add "hash" to the query and results in an API Error of working code. Change-Id: I627ed24ed4e71abb560376b1ec2655852134285e --- M pywikibot/site.py 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/49/119949/1 diff --git a/pywikibot/site.py b/pywikibot/site.py index 78196a5..05a42c6 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -3865,7 +3865,9 @@ params['baserevid'] = claim.on_item.lastrevid if bot: params['bot'] = 1 - if not new and hasattr(qualifier, 'hash'): + if (not new and + hasattr(qualifier, 'hash') and + qualifier.hash is not None): params['snakhash'] = qualifier.hash params['token'] = self.token(claim, 'edit') #build up the snak -- To view, visit https://gerrit.wikimedia.org/r/119949 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I627ed24ed4e71abb560376b1ec2655852134285e Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: FelixReimann <fe...@fex-it.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits