Skip to content
Snippets Groups Projects
Commit 8ceebafd authored by Tanner Prestegard's avatar Tanner Prestegard Committed by GraceDB
Browse files

Bugfix to a custom guardian migration

parent 3448475f
No related branches found
No related tags found
No related merge requests found
......@@ -13,7 +13,8 @@ def add_to_group(apps, schema_editor):
Group = apps.get_model('auth', 'Group')
# Get anonymous user
user = User.objects.get(username=guardian_settings.ANONYMOUS_USER_NAME)
user, created = User.objects.get_or_create(username=
guardian_settings.ANONYMOUS_USER_NAME)
# Get public group
group = Group.objects.get(name=settings.PUBLIC_GROUP)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment