Fix login for existing user
This commit is contained in:
parent
d175fbcb38
commit
1fbd067afe
1 changed files with 4 additions and 1 deletions
|
@ -598,5 +598,8 @@ def createUserStatus(sender, instance, created, **kwargs):
|
||||||
|
|
||||||
@receiver(post_save, sender=settings.AUTH_USER_MODEL)
|
@receiver(post_save, sender=settings.AUTH_USER_MODEL)
|
||||||
def saveUserStatus(sender, instance, **kwargs):
|
def saveUserStatus(sender, instance, **kwargs):
|
||||||
instance.profile.save()
|
try:
|
||||||
|
instance.userstatus.save()
|
||||||
|
except:
|
||||||
|
UserStatus.objects.create(user=instance)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue