🐛 fix(base.py): handle case when file_path is not found for a vertex
This commit is contained in:
parent
77d91cd23a
commit
ecee08502f
1 changed files with 4 additions and 3 deletions
|
|
@ -185,9 +185,10 @@ class Vertex:
|
||||||
# Load the type in value.get('suffixes') using
|
# Load the type in value.get('suffixes') using
|
||||||
# what is inside value.get('content')
|
# what is inside value.get('content')
|
||||||
# value.get('value') is the file name
|
# value.get('value') is the file name
|
||||||
file_path = value.get("file_path")
|
if file_path := value.get("file_path"):
|
||||||
|
params[key] = 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:
|
elif value.get("type") in DIRECT_TYPES and params.get(key) is None:
|
||||||
if value.get("type") == "code":
|
if value.get("type") == "code":
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue