From f7d40a0efe0ea984b983f60b9000c5b8a48b5874 Mon Sep 17 00:00:00 2001 From: David Manthey Date: Mon, 24 Jul 2023 09:35:25 -0400 Subject: [PATCH] Better guards on ACL migration --- CHANGELOG.md | 1 + .../girder_large_image_annotation/models/annotation.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e9b550aea..819d9ec20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ ### Bug Fixes - The nd2 reader throws a different exception with JP2 files ([#1242](../../pull/1242)) +- Better guards on ACL migration ([#1243](../../pull/1243)) ## 1.23.1 diff --git a/girder_annotation/girder_large_image_annotation/models/annotation.py b/girder_annotation/girder_large_image_annotation/models/annotation.py index 07aa7725e..2bf75d76d 100644 --- a/girder_annotation/girder_large_image_annotation/models/annotation.py +++ b/girder_annotation/girder_large_image_annotation/models/annotation.py @@ -764,7 +764,7 @@ def _migrateACL(self, annotation): self.copyAccessPolicies(item, annotation, save=False) self.setUserAccess(annotation, user, AccessType.ADMIN, force=True, save=False) - self.setPublic(annotation, folder.get('public'), save=False) + self.setPublic(annotation, folder.get('public') or False, save=False) # call the super class save method to avoid messing with elements super().save(annotation)