HomePhabricator

Work around T222159

Description

Work around T222159

WikibaseMediaInfo incorrectly serializes empty statements as the empty
array instead of the empty object, causing an error in our code because
we can’t get P180 statements (or default []) from a list in Python. Work
around this by replacing the empty list with an empty object.

This bug, which affected any entity that was not missing but had no
statements – i. e., any file with captions but not statements [1] – was
reported by Olaf Janssen on Twitter [2].

[1]: https://commons.wikimedia.org/w/index.php?search=hascaption%3A*+-haswbstatement%3A*
[2]: https://twitter.com/ookgezellig/status/1190219890105442305

Details

Provenance
LucasWerkmeisterAuthored on Nov 1 2019, 11:11 AM
Parents
R2422:7a4982705c97: Make file name an h1 on file pages
Branches
Unknown
Tags
Unknown
ChangeId
None