From fa45ed13c22aad85f9c781797f51f10224cf9a3b Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat, 6 Apr 2024 06:54:39 -0700 Subject: [PATCH] Also fix groups --- src/documents/data_models.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/documents/data_models.py b/src/documents/data_models.py index 9257e9f57..22572709f 100644 --- a/src/documents/data_models.py +++ b/src/documents/data_models.py @@ -124,10 +124,14 @@ class DocumentMetadataOverrides: attach_perms=True, ) overrides.view_groups = [ - group.id for group, perms in groups_with_perms if "view_document" in perms + group.id + for group in groups_with_perms + if "view_document" in groups_with_perms[group] ] overrides.change_groups = [ - group.id for group, perms in groups_with_perms if "change_document" in perms + group.id + for group in groups_with_perms + if "change_document" in groups_with_perms[group] ] return overrides