1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-22 02:18:21 +02:00

[WEI] Avoid errors if the survey is not ended

Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
2021-09-13 19:02:54 +02:00
parent 600ba15faa
commit ef118c2445
2 changed files with 9 additions and 3 deletions

View File

@ -190,13 +190,12 @@ class WEIRegistration1ATable(tables.Table):
attrs = {
'class': 'table table-condensed table-striped table-hover'
}
model = WEIMembership
model = WEIRegistration
template_name = 'django_tables2/bootstrap4.html'
fields = ('user', 'user__last_name', 'user__first_name', 'gender',
'user__profile__department', 'preferred_bus', 'membership__bus', )
row_attrs = {
'class': 'table-row',
'id': lambda record: "row-" + str(record.pk),
'class': lambda record: '' if 'selected_bus_pk' in record.information else 'bg-danger',
}