We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d9444ac + 05ffd4c commit e363a3bCopy full SHA for e363a3b
scripts/create_anonymous_user.py
@@ -1,3 +1,4 @@
1
+from hub.models import ExtraUserDetail
2
from kpi.utils.object_permission import get_anonymous_user
3
4
@@ -6,4 +7,7 @@ def run():
6
7
Simple call to `get_anonymous_user()` to create the AnonymousUser if
8
it doesn't exist.
9
"""
- get_anonymous_user()
10
+ anon = get_anonymous_user()
11
+ # Ensure the anonymous user has extra details
12
+ ExtraUserDetail.objects.get_or_create(user_id=anon.pk)
13
+
0 commit comments