diff --git a/registrasion/models.py b/registrasion/models.py index 8d9a7127518180f96a7e0d6cbca391867a9f8442..1e0e23dea96129083857e2228032a5eeb5897374 100644 --- a/registrasion/models.py +++ b/registrasion/models.py @@ -46,6 +46,8 @@ class AttendeeProfileBase(models.Model): registration progess. ''' + objects = InheritanceManager() + @classmethod def name_field(cls): ''' This is used to pre-fill the attendee's name from the diff --git a/registrasion/views.py b/registrasion/views.py index 16733840ed7de217257504c408d5e29bdeff7722..e443dc108353fda6ba835f8352259510152c8a66 100644 --- a/registrasion/views.py +++ b/registrasion/views.py @@ -173,6 +173,7 @@ def handle_profile(request, prefix): try: profile = attendee.attendeeprofilebase + profile = rego.AttendeeProfileBase.objects.get_subclass(pk=profile.id) except ObjectDoesNotExist: profile = None @@ -188,7 +189,7 @@ def handle_profile(request, prefix): name_field = ProfileForm.Meta.model.name_field() initial = {} - if name_field is not None: + if profile is None and name_field is not None: initial[name_field] = speaker_name form = ProfileForm(