🐛 fix(base.py): handle case when file_path is not found for a vertex

This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-09-27 12:36:14 -03:00
commit ecee08502f

View file

@ -185,9 +185,10 @@ class Vertex:
# Load the type in value.get('suffixes') using
# what is inside value.get('content')
# value.get('value') is the file name
file_path = value.get("file_path")
params[key] = file_path
if file_path := value.get("file_path"):
params[key] = file_path
else:
raise ValueError(f"File path not found for {self.vertex_type}")
elif value.get("type") in DIRECT_TYPES and params.get(key) is None:
if value.get("type") == "code":
try: