Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

minor fix: fix wrong check of annotation_ids (#23164)

NeatGuyCoding070379a90034
diff --git a/api/controllers/console/app/annotation.py b/api/controllers/console/app/annotation.py
index 2af7136f143..472c694c360 100644
--- a/api/controllers/console/app/annotation.py
+++ b/api/controllers/console/app/annotation.py
@@ -137,7 +137,8 @@ class AnnotationListApi(Resource):
# If annotation_ids are provided, handle batch deletion
if annotation_ids:
- if not annotation_ids:
+ # Check if any annotation_ids contain empty strings or invalid values
+ if not all(annotation_id.strip() for annotation_id in annotation_ids if annotation_id):
return {
"code": "bad_request",
"message": "annotation_ids are required if the parameter is provided.",