From d05d5868f42b0e551f017d61a1bfb68fa26b4e0c Mon Sep 17 00:00:00 2001
From: "J.-S. Caux" <J.S.Caux@uva.nl>
Date: Wed, 3 Apr 2019 12:09:16 +0200
Subject: [PATCH] Fix bug in registration form

---
 scipost/forms.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scipost/forms.py b/scipost/forms.py
index 8b5d9a842..ec8141b43 100644
--- a/scipost/forms.py
+++ b/scipost/forms.py
@@ -186,7 +186,7 @@ class RegistrationForm(forms.Form):
                 orcid_id=self.cleaned_data['orcid_id'],
                 webpage=self.cleaned_data['personalwebpage'])
         # Add a ProfileEmail to this Profile
-        profile_email = ProfileEmail.objects.get_or_create(
+        profile_email, created = ProfileEmail.objects.get_or_create(
             profile=profile, email=self.cleaned_data['email'])
         profile.emails.update(primary=False)
         profile.emails.filter(id=profile_email.id).update(primary=True, still_valid=True)
-- 
GitLab