Skip to content

Commit

Permalink
Merge pull request #386 from Spawin/master
Browse files Browse the repository at this point in the history
Fix: django.contrib.auth.models.User.account.RelatedObjectDoesNotExis…
  • Loading branch information
uhurusurfa authored Jul 22, 2024
2 parents fd13953 + 49345e3 commit 2365a3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion account/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class Account(models.Model):
def for_request(cls, request):
user = getattr(request, "user", None)
if user and user.is_authenticated:
account = user.account
account = getattr(user, "account", None)
if account:
return account
return AnonymousAccount(request)
Expand Down

0 comments on commit 2365a3e

Please sign in to comment.