Skip to content

Commit 4ce471c

Browse files
authored
fix 🔧 fail silently if entity object is deleted (#80)
1 parent 092e01c commit 4ce471c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎oscar_odin/mappings/catalogue.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def _attribute_value_to_native_type(item):
215215
elif obj_type == item.attribute.IMAGE:
216216
return item.value.url
217217

218-
elif obj_type == item.attribute.ENTITY:
218+
elif obj_type == item.attribute.ENTITY and item.value is not None:
219219
if hasattr(item.value, "json"):
220220
return item.value.json()
221221
else:

0 commit comments

Comments
 (0)