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:
Reinier van der Leer
2025-07-10 08:48:18 +01:00
committed by GitHub
parent b3b5eefe2c
commit c77cb1fcfb

View File

@@ -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=(