diff --git a/startup_scripts/000_users.py b/startup_scripts/000_users.py index 446aaeb..6962df0 100644 --- a/startup_scripts/000_users.py +++ b/startup_scripts/000_users.py @@ -26,8 +26,8 @@ with file.open('r') as stream: Token.objects.create(user=user, key=user_details['api_token']) yaml_permissions = user_details.get('permissions', []) - subject = user.user_permissions if yaml_permissions: + subject = user.user_permissions subject.clear() for yaml_permission in yaml_permissions: if '*' in yaml_permission: diff --git a/startup_scripts/010_groups.py b/startup_scripts/010_groups.py index 0a35387..08fb4bf 100644 --- a/startup_scripts/010_groups.py +++ b/startup_scripts/010_groups.py @@ -25,8 +25,8 @@ with file.open('r') as stream: user.groups.add(group) yaml_permissions = group_details.get('permissions', []) - subject = group.permissions if yaml_permissions: + subject = group.permissions subject.clear() for yaml_permission in yaml_permissions: if '*' in yaml_permission: