[PR #16503] fix:weight_type missing when create document in dataset #28519

Closed
opened 2026-02-21 20:43:36 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/16503

State: closed
Merged: Yes


Summary

This pr fix an error when create a document the second time in a dataset.

What changed

  • add "weight_type" field to weighted_score_fields of file api/fields/dataset_fields.py
  • add "weight_type" field to weights in types.ts and debug.ts

Fixes #16411 and #16483

Screenshots

before

图片

after

图片

Checklist

  • 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
**Original Pull Request:** https://github.com/langgenius/dify/pull/16503 **State:** closed **Merged:** Yes --- # Summary This pr fix an error when create a document the second time in a dataset. ## What changed - add "weight_type" field to `weighted_score_fields` of file `api/fields/dataset_fields.py` - add "weight_type" field to weights in `types.ts` and `debug.ts ` Fixes #16411 and #16483 # Screenshots ## before ![图片](https://github.com/user-attachments/assets/2457a9d7-7516-4087-b7c4-0a31ee6a03f7) ## after ![图片](https://github.com/user-attachments/assets/582875aa-25f5-4589-b989-5abe8064080a) # Checklist - [x] I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!) - [x] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change. - [x] I've updated the documentation accordingly. - [x] I ran `dev/reformat`(backend) and `cd web && npx lint-staged`(frontend) to appease the lint gods
yindo added the pull-request label 2026-02-21 20:43:36 -05:00
yindo closed this issue 2026-02-21 20:43:36 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#28519