fix: prevent SQLite error in advanced run flow API (#8576)
* fix: prevent SQLite error in advanced run flow API Passing the flow ID as a string causes a SQLAlchemy error when running on databases without a dedicated UUID data type. Passing a UUID object works consistently across both SQLite and PostgreSQL. * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
b77351331d
commit
1950116916
2 changed files with 5616 additions and 3890 deletions
|
|
@ -544,7 +544,7 @@ async def experimental_run_flow(
|
|||
try:
|
||||
# Get the flow that matches the flow_id and belongs to the user
|
||||
# flow = session.query(Flow).filter(Flow.id == flow_id).filter(Flow.user_id == api_key_user.id).first()
|
||||
stmt = select(Flow).where(Flow.id == flow_id_str).where(Flow.user_id == api_key_user.id)
|
||||
stmt = select(Flow).where(Flow.id == flow_id).where(Flow.user_id == api_key_user.id)
|
||||
flow = (await session.exec(stmt)).first()
|
||||
except sa.exc.StatementError as exc:
|
||||
# StatementError('(builtins.ValueError) badly formed hexadecimal UUID string')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue