dify/api/models
QuantumGhost 13dc1c8795
Simplify `execution_metadata` Handling for `WorkflowNodeExecution` (#20062)
Currently, `WorkflowNodeExecution.execution_metadata_dict` returns `None` when metadata is absent in the database. This requires all callers to perform `None` checks when processing metadata, leading to more complex caller-side logic.

This pull request updates the `execution_metadata_dict` method to return an empty dictionary instead of `None` when metadata is absent. This change would simplify the caller logic, as it removes the need for explicit `None` checks and provides a more consistent data structure to work with.
2025-05-21 18:38:16 +08:00
..
__init__.py feat(workflow): domain model for workflow node execution (#19430) 2025-05-17 00:56:16 +08:00
account.py refactor: Use typed SQLAlchemy base model and fix type errors (#19980) 2025-05-21 15:38:03 +08:00
api_based_extension.py refactor(models): Use the SQLAlchemy base model. (#19435) 2025-05-09 13:52:05 +08:00
base.py refactor: Use typed SQLAlchemy base model and fix type errors (#19980) 2025-05-21 15:38:03 +08:00
dataset.py fix: replace all dataset.Model.query to db.session.query(Model) (#19509) 2025-05-12 13:52:33 +08:00
engine.py feat(api): Add image multimodal support for LLMNode (#17372) 2025-04-30 17:28:02 +08:00
enums.py feat(api): Introduce `WorkflowDraftVariable` Model (#19737) 2025-05-19 22:59:56 +08:00
model.py feat(workflow): domain model for workflow node execution (#19430) 2025-05-17 00:56:16 +08:00
provider.py refactor(models): Use the SQLAlchemy base model. (#19435) 2025-05-09 13:52:05 +08:00
source.py refactor(models): Use the SQLAlchemy base model. (#19435) 2025-05-09 13:52:05 +08:00
task.py Introduce Plugins (#13836) 2025-02-17 17:05:13 +08:00
tools.py refactor: Use typed SQLAlchemy base model and fix type errors (#19980) 2025-05-21 15:38:03 +08:00
types.py feat(api): Introduce `WorkflowDraftVariable` Model (#19737) 2025-05-19 22:59:56 +08:00
web.py Introduce Plugins (#13836) 2025-02-17 17:05:13 +08:00
workflow.py Simplify `execution_metadata` Handling for `WorkflowNodeExecution` (#20062) 2025-05-21 18:38:16 +08:00