Skip to content

chore: dep inject for model in datasets document and web human input … - #40151

Merged
asukaminato0721 merged 3 commits into
langgenius:mainfrom
likalikali:dep-inject-datasets-web
Aug 7, 2026
Merged

chore: dep inject for model in datasets document and web human input …#40151
asukaminato0721 merged 3 commits into
langgenius:mainfrom
likalikali:dep-inject-datasets-web

Conversation

@likalikali

Copy link
Copy Markdown
Contributor

Important

  1. Make sure you have read our https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

Summary

#36659

Replace manual DocumentMetadataUpdatePayload.model_validate(request.get_json() or {}) and HumanInputFormSubmitPayload.model_validate(request.get_json()) with the @model_validate decorator introduced in #36750, injecting the validated payload as a method argument.

Screenshots

N/A — backend-only refactoring, no UI changes.

Checklist

  • This change requires a documentation update, included: https://github.com/langgenius/dify-docs
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran make lint && make type-check (backend) and cd web && pnpm exec vp staged (frontend) to appease the lint gods

…form

Replace manual DocumentMetadataUpdatePayload.model_validate(request.get_json() or {}) and HumanInputFormSubmitPayload.model_validate(request.get_json()) with the @model_validate decorator introduced in langgenius#36750, injecting the validated payload as a method argument.
@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. refactor labels Aug 7, 2026
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Pyrefly Type Coverage

Metric Base PR Delta
Type coverage 57.99% 57.99% +0.00%
Strict coverage 57.56% 57.56% +0.00%
Typed symbols 37,825 37,827 +2
Untyped symbols 27,605 27,605 0
Modules 3133 3133 0

Pass DocumentMetadataUpdatePayload as first arg to unwrapped method, matching the new @model_validate decorator signature.
@likalikali
likalikali requested a review from laipz8200 as a code owner August 7, 2026 10:20
@asukaminato0721
asukaminato0721 added this pull request to the merge queue Aug 7, 2026
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Aug 7, 2026
Merged via the queue into langgenius:main with commit a279be9 Aug 7, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer refactor size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants