Skip to content

Commit

Permalink
Name annotations by default if they have no name.
Browse files Browse the repository at this point in the history
  • Loading branch information
manthey committed Apr 29, 2022
1 parent bd75fa2 commit a75c838
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,8 @@ def createAnnotation(self, item, creator, annotation, public=None):
'updated': now,
'annotation': annotation,
}
if annotation and not annotation.get('name'):
annotation['name'] = now.strftime('Annotation %Y-%m-%d %H:%M')

# copy access control from the folder containing the image
folder = Folder().load(item['folderId'], force=True)
Expand Down

0 comments on commit a75c838

Please sign in to comment.