summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/patchwork/forms.py5
-rw-r--r--apps/patchwork/models.py2
2 files changed, 6 insertions, 1 deletions
diff --git a/apps/patchwork/forms.py b/apps/patchwork/forms.py
index c02d11e..bc746bd 100644
--- a/apps/patchwork/forms.py
+++ b/apps/patchwork/forms.py
@@ -44,6 +44,11 @@ class RegistrationForm(RegistrationFormUniqueEmail):
user.first_name = self.cleaned_data.get('first_name', '')
user.last_name = self.cleaned_data.get('last_name', '')
user.save()
+
+ # saving the userprofile causes the firstname/lastname to propagate
+ # to the person objects.
+ user.get_profile().save()
+
return user
def clean(self):
diff --git a/apps/patchwork/models.py b/apps/patchwork/models.py
index 11457d7..fb2ccc7 100644
--- a/apps/patchwork/models.py
+++ b/apps/patchwork/models.py
@@ -122,7 +122,7 @@ class UserProfile(models.Model):
person.save()
else:
for person in people:
- person.user = self.user
+ person.link_to_user(self.user)
person.save()
def __str__(self):