diff --git a/bda/tests/test_models.py b/bda/tests/test_models.py index b8a23ba7..ba96238a 100644 --- a/bda/tests/test_models.py +++ b/bda/tests/test_models.py @@ -69,7 +69,7 @@ class SpectacleReventeTests(TestCase): revente = self.rev wanted_by = [self.p1, self.p2, self.p3] - revente.confirmed_entry = wanted_by + revente.confirmed_entry.set(wanted_by) with mock.patch("bda.models.random.choice") as mc: # Set winner to self.p1. diff --git a/gestioncof/views.py b/gestioncof/views.py index f5000456..fe9013de 100644 --- a/gestioncof/views.py +++ b/gestioncof/views.py @@ -164,7 +164,7 @@ def survey(request, survey_id): except SurveyAnswer.DoesNotExist: current_answer = SurveyAnswer(user=request.user, survey=survey) current_answer.save() - current_answer.answers = all_answers + current_answer.answers.set(all_answers) current_answer.save() success = True else: @@ -234,7 +234,7 @@ def event(request, event_id): (current_registration, _) = EventRegistration.objects.get_or_create( user=request.user, event=event ) - current_registration.options = all_choices + current_registration.options.set(all_choices) current_registration.save() success = True else: @@ -521,7 +521,7 @@ def registration(request): user=member, event=form.event ) update_event_form_comments(form.event, form, current_registration) - current_registration.options = all_choices + current_registration.options.set(all_choices) current_registration.paid = form.cleaned_data["status"] == "paid" current_registration.save() # if form.event.title == "Mega 15" and created_reg: