Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Startup scripts typos #632

Merged
merged 1 commit into from
Oct 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion startup_scripts/010_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@

if user:
group.user_set.add(user)
print(" 👤 Assigned user %s to group %s" % (username, AdminGroup.name))
print(" 👤 Assigned user %s to group %s" % (username, group.name))

group.save()
10 changes: 8 additions & 2 deletions startup_scripts/015_object_permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,20 @@

if group:
object_permission.groups.add(group)
print(" 👥 Assigned group %s object permission of %s" % (groupname, groupname))
print(
" 👥 Assigned group %s object permission of %s"
% (groupname, object_permission.name)
)

if permission_details.get("users", 0):
for username in permission_details["users"]:
user = AdminUser.objects.filter(username=username).first()

if user:
object_permission.users.add(user)
print(" 👤 Assigned user %s object permission of %s" % (username, groupname))
print(
" 👤 Assigned user %s object permission of %s"
% (username, object_permission.name)
)

object_permission.save()