Fix login for existing user

This commit is contained in:
Kumi 2019-02-01 08:27:34 +00:00
parent d175fbcb38
commit 1fbd067afe

View file

@ -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)