diff --git a/accounts/api/views.py b/accounts/api/views.py index ad1fd02..bda2198 100644 --- a/accounts/api/views.py +++ b/accounts/api/views.py @@ -700,13 +700,13 @@ class GoogleLoginAPIView(APIView): email=email, defaults=defaults, ) - + principal_type_instance = IAmPrincipalType.objects.get(name=principal_type) # If newly created, set password if created: print("New Created") default_password = f"GTMES{email[::-1]}" principal.set_password(default_password) - principal.principal_type = principal_type # Assuming principal_type should only be set on creation + principal.principal_type = principal_type_instance # Assuming principal_type should only be set on creation principal.principal_source = google_source principal.save()