From fe4d06313568d5254be65a8d5ab58d5bebe6e9e1 Mon Sep 17 00:00:00 2001 From: Oliver Date: Fri, 25 Feb 2022 17:19:39 +1100 Subject: [PATCH] Change some prints to log messages --- InvenTree/users/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/InvenTree/users/models.py b/InvenTree/users/models.py index a95fd21385..c593fb49f3 100644 --- a/InvenTree/users/models.py +++ b/InvenTree/users/models.py @@ -451,7 +451,7 @@ def update_group_roles(group, debug=False): group.permissions.add(permission) if debug: # pragma: no cover - print(f"Adding permission {perm} to group {group.name}") + logger.info(f"Adding permission {perm} to group {group.name}") # Remove any extra permissions from the group for perm in permissions_to_delete: @@ -466,7 +466,7 @@ def update_group_roles(group, debug=False): group.permissions.remove(permission) if debug: # pragma: no cover - print(f"Removing permission {perm} from group {group.name}") + logger.info(f"Removing permission {perm} from group {group.name}") # Enable all action permissions for certain children models # if parent model has 'change' permission @@ -488,7 +488,7 @@ def update_group_roles(group, debug=False): permission = get_permission_object(child_perm) if permission: group.permissions.add(permission) - print(f"Adding permission {child_perm} to group {group.name}") + logger.info(f"Adding permission {child_perm} to group {group.name}") @receiver(post_save, sender=Group, dispatch_uid='create_missing_rule_sets')