hotfix: custom attribute keys which are not on entities are skipped

This commit is contained in:
Jakub Trllo 2019-07-01 17:08:02 +02:00
parent f67df1f8e8
commit 029ccc0f55

View file

@ -380,7 +380,8 @@ def get_data(entity, session, custom_attributes):
ent_obj_type_id = session.query(query).one()['id']
if cust_attr['object_type_id'] == ent_obj_type_id:
data[key] = entity['custom_attributes'][key]
if key in entity['custom_attributes']:
data[key] = entity['custom_attributes'][key]
if entity_type in ['Project']:
data['code'] = entity['name']