mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
fix(backend/library): Fix sub_graphs check in LibraryAgent.from_db(..) (#10316)
- Follow-up fix for #10301 The condition that determines whether `LibraryAgent.credentials_input_schema` is set incorrectly handles empty lists of sub-graphs. ### Changes 🏗️ - Check if `sub_graphs is not None` rather than using the boolean interpretation of `sub_graphs` ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - Trivial change, no test needed.
This commit is contained in:
committed by
GitHub
parent
b3b5eefe2c
commit
c77cb1fcfb
@@ -127,7 +127,7 @@ class LibraryAgent(pydantic.BaseModel):
|
||||
description=graph.description,
|
||||
input_schema=graph.input_schema,
|
||||
credentials_input_schema=(
|
||||
graph.credentials_input_schema if sub_graphs else None
|
||||
graph.credentials_input_schema if sub_graphs is not None else None
|
||||
),
|
||||
has_external_trigger=graph.has_webhook_trigger,
|
||||
trigger_setup_info=(
|
||||
|
||||
Reference in New Issue
Block a user