[WEB - 1998] fix: profile creation on user signup (#5168)
* fix: profile creation while sign in up * dev: destructure tupple for get or create
This commit is contained in:
parent
cb21dcbcef
commit
065c9779bb
2 changed files with 2 additions and 2 deletions
|
|
@ -3,7 +3,7 @@ from plane.db.models import Profile, Workspace, WorkspaceMemberInvite
|
|||
|
||||
def get_redirection_path(user):
|
||||
# Handle redirections
|
||||
profile = Profile.objects.get(user=user)
|
||||
profile, _ = Profile.objects.get_or_create(user=user)
|
||||
|
||||
# Redirect to onboarding if the user is not onboarded yet
|
||||
if not profile.is_onboarded:
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ class MagicSignInEndpoint(View):
|
|||
callback=post_user_auth_workflow,
|
||||
)
|
||||
user = provider.authenticate()
|
||||
profile = Profile.objects.get(user=user)
|
||||
profile, _ = Profile.objects.get_or_create(user=user)
|
||||
# Login the user and record his device info
|
||||
user_login(request=request, user=user, is_app=True)
|
||||
if user.is_password_autoset and profile.is_onboarded:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue