Bug fix broken assert

This commit is contained in:
Edward Betts 2023-11-09 10:20:43 +01:00
parent 3b69855c25
commit 1523b23ba3

View file

@ -90,7 +90,7 @@ class Item(Base):
@property
def artist(self) -> str | None:
v = wikibase.first_datavalue(typing.cast(Entity, self.entity), "P170")
assert isinstance(v, dict)
assert v is None or isinstance(v, dict)
return v["id"] if v else None
@property