Skip to content

Commit

Permalink
Merge pull request #863 from girder/faster-remove-item-annotations
Browse files Browse the repository at this point in the history
Speed up remove all annotations from an item
  • Loading branch information
manthey authored May 24, 2022
2 parents f40ed1d + 5eff835 commit 88749c0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ def deleteItemAnnotations(self, item):

count = 0
for annotation in Annotation().find(query, limit=0, sort=[('_id', 1)]):
annot = Annotation().load(annotation['_id'], user=user)
annot = Annotation().load(annotation['_id'], user=user, getElements=False)
if annot:
Annotation().remove(annot)
count += 1
Expand Down

0 comments on commit 88749c0

Please sign in to comment.