Jarekt added subscribers: matej_suchanek, Jarekt.
Jarekt added a comment.

Workaround: mw.wikibase.getEntity() always returns the target entity with the new id. So you can do:

local id = ...
local entity = mw.wikibase.getEntity(id)
if id ~= entity.id then
    it's redirected
end

Matej, workaround seems to solve the problem. Maybe we should document the way to check for redirects and close this task, or do we want to add short trivial function to mw.wikibase to do the test?


TASK DETAIL
https://phabricator.wikimedia.org/T96478

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Jarekt
Cc: Jarekt, matej_suchanek, Ricordisamoa, hoo, Bene, Lydia_Pintscher, Aklapper, Multichill, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, Wikidata-bugs, aude, Mbch331
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to