forked from DGNum/gestioCOF
Formattage et robustesse
- Ajoute des espaces après les `:` dans la déclaration des dictionnaires. - Change le `= 2` et `+= 1` pour rendre le code plus résistant à une éventuelle mise à jour.
This commit is contained in:
parent
38acbd82d1
commit
afc4718f2d
1 changed files with 7 additions and 7 deletions
14
bda/views.py
14
bda/views.py
|
@ -296,15 +296,15 @@ def spectacle(request, tirage_id, spectacle_id):
|
||||||
participants = {}
|
participants = {}
|
||||||
for attrib in attributions:
|
for attrib in attributions:
|
||||||
participant = attrib.participant
|
participant = attrib.participant
|
||||||
participant_info = {'lastname':participant.user.last_name,
|
participant_info = {'lastname': participant.user.last_name,
|
||||||
'name': participant.user.get_full_name,
|
'name': participant.user.get_full_name,
|
||||||
'username':participant.user.username,
|
'username': participant.user.username,
|
||||||
'email':participant.user.email,
|
'email': participant.user.email,
|
||||||
'given':attrib.given,
|
'given': attrib.given,
|
||||||
'paid':participant.paid,
|
'paid': participant.paid,
|
||||||
'nb_places':1}
|
'nb_places': 1}
|
||||||
if participant.id in participants:
|
if participant.id in participants:
|
||||||
participants[participant.id]['nb_places'] = 2
|
participants[participant.id]['nb_places'] += 1
|
||||||
else:
|
else:
|
||||||
participants[participant.id] = participant_info
|
participants[participant.id] = participant_info
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue