| Lokal_Profil added projects: Pywikibot-core, Pywikibot-Wikidata. Lokal_Profil edited the task description. (Show Details) Herald added a subscriber: pywikibot-bugs-list. |
EDIT DETAILS
It looks like the bot adds Coordinate claims identical to already existing ones (same value and reference)Comparing a newly created `Coordinate` claim with one fetched from Wikidata fails even if these are the same.
This occurs because `_entity` does not get initialised if `globe` is used during initialisation. This seems to be the only type of claim thatSimilarly if `entity`/`globe_item` is affected -- for all other types the automatic detection works as expectedused globe would not get initialised.
A work-around is to not add a Coordinate claim if one already exists, regardless of its valueThe solution is to override `__eq__` in a similar way to how this was done for `WbQuantity` or to rethink how we compare the different Wikibase claim types.
This occurs because `_entity` does not get initialised if `globe` is used during initialisation. This seems to be the only type of claim thatSimilarly if `entity`/`globe_item` is affected -- for all other types the automatic detection works as expectedused globe would not get initialised.
A work-around is to not add a Coordinate claim if one already exists, regardless of its valueThe solution is to override `__eq__` in a similar way to how this was done for `WbQuantity` or to rethink how we compare the different Wikibase claim types.
TASK DETAIL
EMAIL PREFERENCES
To: Lokal_Profil
Cc: pywikibot-bugs-list, gerritbot, Lokal_Profil, Aklapper, Alicia_Fagerving_WMSE, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, Magul, Tbscho, MayS, Lewizho99, Mdupont, JJMC89, Maathavan, Avicennasis, Sn1per, jayvdb, Ricordisamoa, Dalba, Masti, Alchimista, Romaine, Rxy
Cc: pywikibot-bugs-list, gerritbot, Lokal_Profil, Aklapper, Alicia_Fagerving_WMSE, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, Magul, Tbscho, MayS, Lewizho99, Mdupont, JJMC89, Maathavan, Avicennasis, Sn1per, jayvdb, Ricordisamoa, Dalba, Masti, Alchimista, Romaine, Rxy
_______________________________________________ pywikibot-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
