Backwards-incompatible changes : manytomany set

This commit is contained in:
Ludovic Stephan 2019-04-17 18:21:59 +02:00
parent 4064218010
commit 413a9cddb1
2 changed files with 4 additions and 4 deletions

View file

@ -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.

View file

@ -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: