Jarekt added subscribers: matej_suchanek, Jarekt.Jarekt added a comment.
In T96478#1961396, @matej_suchanek wrote:
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 DETAILhttps://phabricator.wikimedia.org/T96478EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: JarektCc: 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