From cfd2c05ae2b5638cdc26ca7aadb0c613983b8fa9 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Thu, 29 Apr 2021 10:12:56 -0700 Subject: [PATCH] Safely handle absent claims field --- bookwyrm/connectors/inventaire.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bookwyrm/connectors/inventaire.py b/bookwyrm/connectors/inventaire.py index e972950fb..e6fb6826f 100644 --- a/bookwyrm/connectors/inventaire.py +++ b/bookwyrm/connectors/inventaire.py @@ -65,7 +65,7 @@ class Connector(AbstractConnector): raise ConnectorException("Invalid book data") # flatten the data so that images, uri, and claims are on the same level return { - **data.get("claims"), + **data.get("claims", {}), **{k: data.get(k) for k in ["uri", "image", "labels"]}, }