ensures User.vpnuser is created on signup

master
alice 3 years ago
parent 8dfe4905b4
commit 5cbe17ab8c

@ -98,6 +98,12 @@ def signup(request):
)
user.save()
try:
user.vpnuser
except VPNUser.DoesNotExist:
user.vpnuser = VPNUser.objects.create(user=user)
user.vpnuser.save()
try:
user.vpnuser.referrer = User.objects.get(id=request.session.get("referrer"))
except User.DoesNotExist:

Loading…
Cancel
Save