addes explicit bson error catching in assign_look

This commit is contained in:
aardschok 2017-08-03 15:51:53 +02:00
parent 8becf73791
commit afd490ce33

View file

@ -775,7 +775,7 @@ def assign_look(nodes, subset="lookDefault"):
# create objectId for database
try:
asset_id = bson.ObjectId(asset_id)
except Exception:
except bson.errors.InvalidId:
log.warning("Asset ID is not compatible with bson")
continue
subset_data = io.find_one({"type": "subset",