From 1fbd067afe5cb452a5b5c8db72a931a6e017c6a2 Mon Sep 17 00:00:00 2001 From: Klaus-Uwe Mitterer Date: Fri, 1 Feb 2019 08:27:34 +0000 Subject: [PATCH] Fix login for existing user --- manager/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/manager/views.py b/manager/views.py index 78d377b..2634609 100644 --- a/manager/views.py +++ b/manager/views.py @@ -598,5 +598,8 @@ def createUserStatus(sender, instance, created, **kwargs): @receiver(post_save, sender=settings.AUTH_USER_MODEL) def saveUserStatus(sender, instance, **kwargs): - instance.profile.save() + try: + instance.userstatus.save() + except: + UserStatus.objects.create(user=instance)