Skip to content

Commit

Permalink
fix: size might be missing in file relation (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
sveneberth authored Aug 20, 2024
1 parent e20164b commit 345e709
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/viur/toolkit/importer/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,11 @@ def import_file(self, info: dict[str, t.Any]) -> None | db.Key:
name = info["name"]
dlkey = info["dlkey"]
servingurl = info.get("servingurl")
size = info["size"]
try:
size = info["size"]
except KeyError:
logger.warning(f"size is missing in {info=}")
size = -1

if not isinstance(size, int):
try:
Expand Down

0 comments on commit 345e709

Please sign in to comment.