Skip to content

Commit 59a8862

Browse files
Remove eval (terminusdb#381)
* Remove eval * Remove trailing #
1 parent 59f433c commit 59a8862

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

terminusdb_client/schema/schema.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def _check_missing_prop(doc_obj: "DocumentTemplate"):
8585
if not hasattr(doc_obj, prop):
8686
raise ValueError(f"{doc_obj} missing property: {prop}")
8787
else:
88-
prop_value = eval(f"doc_obj.{prop}") # noqa: S307
88+
prop_value = getattr(doc_obj, prop)
8989
_check_mismatch_type(prop, prop_value, prop_type)
9090
# raise TypeError(f"Property of {doc_obj} missing should be type {prop_type} but got {prop_value} which is {type(prop_value)}")
9191

0 commit comments

Comments
 (0)