Commit b2a6bcfe by Őry Máté

school: handle first login with pre-existing Person object

parent 7434cd62
......@@ -46,7 +46,8 @@ def login(request):
user.last_name = request.META['sn']
user.email = request.META['email']
user.save()
p, created = Person.objects.get_or_create(user=user)
p, created = Person.objects.get_or_create(code=user.username)
p.user_id = user.id
p.save()
try:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment