missing arg in route #18581

Closed
opened 2026-02-21 19:49:25 -05:00 by yindo · 0 comments
Owner

Originally created by @asukaminato0721 on GitHub (Sep 29, 2025).

high

While the refactoring to use @ns.route is a good change, there appears to be a pre-existing issue in the patch method of this TagUpdateDeleteApi class. The call to TagService.update_tags on line 65 passes args that only contain the tag name. The service method TagService.update_tags seems to expect a type field in args to perform the uniqueness check for the tag name. Since type is missing, the validation is skipped, which could allow duplicate tag names to be created. This is not a bug introduced by this PR, but it would be beneficial to fix it to ensure data integrity.

Originally posted by @gemini-code-assist[bot] in https://github.com/langgenius/dify/pull/26357#discussion_r2385077516

Originally created by @asukaminato0721 on GitHub (Sep 29, 2025). ![high](https://www.gstatic.com/codereviewagent/high-priority.svg) While the refactoring to use `@ns.route` is a good change, there appears to be a pre-existing issue in the `patch` method of this `TagUpdateDeleteApi` class. The call to `TagService.update_tags` on line 65 passes `args` that only contain the tag `name`. The service method `TagService.update_tags` seems to expect a `type` field in `args` to perform the uniqueness check for the tag name. Since `type` is missing, the validation is skipped, which could allow duplicate tag names to be created. This is not a bug introduced by this PR, but it would be beneficial to fix it to ensure data integrity. _Originally posted by @gemini-code-assist[bot] in https://github.com/langgenius/dify/pull/26357#discussion_r2385077516_
yindo added the 🐞 bug label 2026-02-21 19:49:25 -05:00
yindo closed this issue 2026-02-21 19:49:25 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#18581