jayvdb added a subscriber: jayvdb. jayvdb added a comment.
My immediate workaround is for you to revise your code to add the references as part of the same operation.
Use ItemPage.get(), then alter the ItemPage contents (i.e. add Claims directly to item.claims), and then save it with Page.editEntity() One editentities API call; one edit; no edit conflicts. See tests/wikibase_edit_tests.py test_edit_entity*
Also see https://gerrit.wikimedia.org/r/#/c/176934/ which makes it easier to add Claims to the ItemPage.
TASK DETAIL https://phabricator.wikimedia.org/T85341
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: jayvdb Cc: Aklapper, Multichill, jayvdb, pywikipedia-bugs