diff --git a/CHANGELOG.md b/CHANGELOG.md index 7728099a2..371a8b16a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ### Changes - Prohibit bioformats and vips from reading mrxs directly ([#1328](../../pull/1328)) - Handle Python 3.12 deprecating utcnow ([#1331](../../pull/1331)) +- Turn down logging about annotation ACLs ([#1332](../../pull/1332)) ## 1.25.0 diff --git a/girder_annotation/girder_large_image_annotation/models/annotation.py b/girder_annotation/girder_large_image_annotation/models/annotation.py index 22be1fbb7..0173d91d3 100644 --- a/girder_annotation/girder_large_image_annotation/models/annotation.py +++ b/girder_annotation/girder_large_image_annotation/models/annotation.py @@ -759,13 +759,13 @@ def _migrateACL(self, annotation): item = Item().load(annotation['itemId'], force=True) if item is None: - logger.warning( + logger.debug( 'Could not generate annotation ACL due to missing item %s', annotation['_id']) return annotation folder = Folder().load(item['folderId'], force=True) if folder is None: - logger.warning( + logger.debug( 'Could not generate annotation ACL due to missing folder %s', annotation['_id']) return annotation @@ -773,7 +773,7 @@ def _migrateACL(self, annotation): if annotation.get('creatorId'): user = User().load(annotation['creatorId'], force=True) if user is None: - logger.warning( + logger.debug( 'Could not generate annotation ACL due to missing user %s', annotation['_id']) return annotation diff --git a/girder_annotation/test_annotation/test_annotations.py b/girder_annotation/test_annotation/test_annotations.py index c50982f78..92a89ee1a 100644 --- a/girder_annotation/test_annotation/test_annotations.py +++ b/girder_annotation/test_annotation/test_annotations.py @@ -691,7 +691,7 @@ def testMigrateAnnotationAccessControlNoItemError(self, user, admin): Annotation().save(annot) with mock.patch('girder_large_image_annotation.models.annotation.logger') as logger: Annotation()._migrateDatabase() - logger.warning.assert_called_once() + logger.debug.assert_called_once() annot = Annotation().load(annot['_id'], force=True) assert 'access' not in annot @@ -711,7 +711,7 @@ def testMigrateAnnotationAccessControlNoFolderError(self, user, admin): Item().save(item) with mock.patch('girder_large_image_annotation.models.annotation.logger') as logger: Annotation()._migrateDatabase() - logger.warning.assert_called_once() + logger.debug.assert_called_once() annot = Annotation().load(annot['_id'], force=True) assert 'access' not in annot @@ -728,7 +728,7 @@ def testMigrateAnnotationAccessControlNoUserError(self, user, admin): Annotation().save(annot) with mock.patch('girder_large_image_annotation.models.annotation.logger') as logger: Annotation()._migrateDatabase() - logger.warning.assert_called_once() + logger.debug.assert_called_once() annot = Annotation().load(annot['_id'], force=True) assert 'access' not in annot @@ -745,6 +745,6 @@ def testMigrateAnnotationAccessControlNullUserError(self, user, admin): Annotation().save(annot) with mock.patch('girder_large_image_annotation.models.annotation.logger') as logger: Annotation()._migrateDatabase() - logger.warning.assert_called_once() + logger.debug.assert_called_once() annot = Annotation().load(annot['_id'], force=True) assert 'access' not in annot