Skip to content

Commit

Permalink
error checking configurator dict value
Browse files Browse the repository at this point in the history
  • Loading branch information
RobBuchananCompPhys committed Feb 10, 2025
1 parent 330ef86 commit 310912a
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,7 @@ def configure(self, value: str):
try:
dict_value = json.loads(value)

try:
{"filter", "attributes"} in set(dict_value.keys())
except (TypeError, ValueError) as e:
if not {"filter", "attributes"} <= dict_value.keys():
self.error_status = f"The dictionary \n{dict_value}\n does not contain the expected keys"

except (TypeError, ValueError) as e:
Expand Down

0 comments on commit 310912a

Please sign in to comment.