Skip to content

Commit e363a3b

Browse files
committed
Merge branch 'release/2.025.02' into release/2.025.10
2 parents d9444ac + 05ffd4c commit e363a3b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/create_anonymous_user.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from hub.models import ExtraUserDetail
12
from kpi.utils.object_permission import get_anonymous_user
23

34

@@ -6,4 +7,7 @@ def run():
67
Simple call to `get_anonymous_user()` to create the AnonymousUser if
78
it doesn't exist.
89
"""
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

Comments
 (0)