sorry this didnt work, when i try this
if created:
instance.profile = Profile.objects.create(user=instance)
instance.save()
i couldnt even register any user
On Mon, Jul 27, 2020 at 2:24 AM Fernando Hernandez
wrote:
> I think the issue is here instance.profile will be None first time the
I think the issue is here instance.profile will be None first time the
CustomUser is created, you need to assign the created Profile to the
instance and then save the user
[image: image.png]
try this
if created:
instance.profile = Profile.objects.create(user=instance)
instance.save()
On
2 matches
Mail list logo