Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: DocumentAddByFileApi miss data_source_type field but there is a mandatory value check #12273

Merged

Conversation

lyfuci
Copy link
Contributor

@lyfuci lyfuci commented Jan 1, 2025

Summary

Fixed a bug in DocumentAddByFileApi where the data_source_type field and its corresponding value were missing when constructing the data_source. Fixes #12272

Screenshots

before:
image

after:
image

Checklist

Important

Please review the checklist below before submitting your pull request.

  • This change requires a documentation update, included: Dify Document
  • 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 dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. 🐞 bug Something isn't working labels Jan 1, 2025
@crazywoola crazywoola requested a review from laipz8200 January 1, 2025 05:34
crazywoola
crazywoola previously approved these changes Jan 2, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 2, 2025
@crazywoola
Copy link
Member

Please fix the error in CI.

@laipz8200 laipz8200 requested a review from JohnJyong January 2, 2025 02:13
JohnJyong
JohnJyong previously approved these changes Jan 2, 2025
@JohnJyong
Copy link
Collaborator

pls fix the python style check @lyfuci

@lyfuci
Copy link
Contributor Author

lyfuci commented Jan 2, 2025

@JohnJyong I am quite a rookie for this project, and after running the ruff format command, I found that a comma was missing at the end, and adjusted.

After checking the DocumentUpdateByFileApi, I noticed the same problem of the issue relatted to this PR exists and has been fixed as well.

@laipz8200
Copy link
Member

Just run dev/reformat to fix this.

@lyfuci lyfuci dismissed stale reviews from JohnJyong and crazywoola via 6f1de8d January 2, 2025 03:16
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Jan 2, 2025
@lyfuci
Copy link
Contributor Author

lyfuci commented Jan 2, 2025

Just run dev/reformat to fix this.

@laipz8200 thanks,I use "ruff format" command seems work, anything wrong just tell me.

@laipz8200 laipz8200 merged commit f71af7c into langgenius:main Jan 2, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

/document/create-by-file can not work for missing data_source_type field value
4 participants