Skip to content

Commit

Permalink
remove raising an exception when rules are not dict or list
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewelamb committed Feb 26, 2024
1 parent 0fa19d8 commit 86a9d11
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions schematic/schemas/data_model_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,8 @@ def run_rel_functions(

elif rel_func == parse_validation_rules:
rules = attr_relationships[csv_header]
if not isinstance(rules, dict) or isinstance(rules, list):
raise ValueError(
"Rules are not formatted properly, should be a dict or list"
)
return parse_validation_rules(rules)
if isinstance(rules, dict) or isinstance(rules, list):
return parse_validation_rules(rules)

elif rel_func == get_label_from_display_name:
return get_label_from_display_name(
Expand Down

0 comments on commit 86a9d11

Please sign in to comment.