1👍
✅
It happens, because you set related_name='profile'
and then you call it with instance.userprofile.save()
. Change it to:
@receiver(post_save, sender=User)
def save_user_profile(sender, instance, **kwargs):
instance.profile.save()
and it should work smoothly 🙂
Source:stackexchange.com