From a75c8384ceabe7f8ec5b75f408e2db9f74379073 Mon Sep 17 00:00:00 2001 From: David Manthey Date: Fri, 29 Apr 2022 14:37:55 -0400 Subject: [PATCH] Name annotations by default if they have no name. --- .../girder_large_image_annotation/models/annotation.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/girder_annotation/girder_large_image_annotation/models/annotation.py b/girder_annotation/girder_large_image_annotation/models/annotation.py index 00279e8d5..920648f17 100644 --- a/girder_annotation/girder_large_image_annotation/models/annotation.py +++ b/girder_annotation/girder_large_image_annotation/models/annotation.py @@ -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)