From 684db677335c22566fb28605c0c3f57a71ca8aa8 Mon Sep 17 00:00:00 2001 From: eeintech Date: Thu, 5 Nov 2020 09:37:01 -0500 Subject: [PATCH] Added check for remove too --- InvenTree/users/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/InvenTree/users/models.py b/InvenTree/users/models.py index 7fc9145427..98efb14764 100644 --- a/InvenTree/users/models.py +++ b/InvenTree/users/models.py @@ -331,7 +331,8 @@ def update_group_roles(group, debug=False): permission = get_permission_object(perm) - group.permissions.remove(permission) + if permission: + group.permissions.remove(permission) if debug: print(f"Removing permission {perm} from group {group.name}")