Skip to content

Commit

Permalink
Improve dictionary retrieval
Browse files Browse the repository at this point in the history
  • Loading branch information
lognaturel committed Nov 7, 2023
1 parent fac4627 commit a8558c8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pyxform/entities/entities_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ def get_entity_declaration(
entity_row = entities_sheet[0]

dataset_name = get_validated_dataset_name(entity_row)
entity_id = entity_row["entity_id"] if "entity_id" in entity_row else None
create_condition = entity_row["create_if"] if "create_if" in entity_row else None
update_condition = entity_row["update_if"] if "update_if" in entity_row else None
entity_label = entity_row["label"] if "label" in entity_row else None
entity_id = entity_row.get("entity_id", None)
create_condition = entity_row.get("create_if", None)
update_condition = entity_row.get("update_if", None)
entity_label = entity_row.get("label", None)

if update_condition and not (entity_id):
raise PyXFormError(
Expand Down

0 comments on commit a8558c8

Please sign in to comment.