fix: "Flow" object has no field "last_tested_version" when loading flows from dir (#2221)
This commit is contained in:
parent
5a41224560
commit
e3656a6a43
3 changed files with 12 additions and 7 deletions
|
|
@ -341,9 +341,9 @@ def load_flows_from_directory():
|
|||
if existing:
|
||||
logger.info(f"Updating existing flow: {flow_id} with endpoint name {flow_endpoint_name}")
|
||||
for key, value in flow.items():
|
||||
if key == "last_tested_version":
|
||||
continue
|
||||
setattr(existing, key, value)
|
||||
if hasattr(existing, key):
|
||||
# flow dict from json and db representation are not 100% the same
|
||||
setattr(existing, key, value)
|
||||
existing.updated_at = datetime.utcnow()
|
||||
existing.user_id = user_id
|
||||
session.add(existing)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue