forked from DGNum/gestioCOF
Fix semantic error in events
`gestioncof.views.registration` was using an `event` variable that was not properly defined. Due to a semantics oddity of python2, the value used was from a previous and (somewhat) unrelated list comprehension.
This commit is contained in:
parent
7f61870236
commit
73eac1886a
1 changed files with 3 additions and 3 deletions
|
@ -453,13 +453,13 @@ def registration(request):
|
||||||
(current_registration, created_reg) = \
|
(current_registration, created_reg) = \
|
||||||
EventRegistration.objects.get_or_create(user=member,
|
EventRegistration.objects.get_or_create(user=member,
|
||||||
event=form.event)
|
event=form.event)
|
||||||
update_event_form_comments(event, form, current_registration)
|
update_event_form_comments(form.event, form, current_registration)
|
||||||
current_registration.options = all_choices
|
current_registration.options = all_choices
|
||||||
current_registration.paid = \
|
current_registration.paid = \
|
||||||
(form.cleaned_data['status'] == 'paid')
|
(form.cleaned_data['status'] == 'paid')
|
||||||
current_registration.save()
|
current_registration.save()
|
||||||
if event.title == "Mega 15" and created_reg:
|
if form.event.title == "Mega 15" and created_reg:
|
||||||
field = EventCommentField.objects.get(event=event,
|
field = EventCommentField.objects.get(event=form.event,
|
||||||
name="Commentaires")
|
name="Commentaires")
|
||||||
try:
|
try:
|
||||||
comments = EventCommentValue.objects.get(
|
comments = EventCommentValue.objects.get(
|
||||||
|
|
Loading…
Reference in a new issue