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

This commit is contained in:
NeatGuyCoding 2025-07-30 17:04:31 +08:00 committed by GitHub
parent bbdeb15501
commit 070379a900
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -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.",