fix admin
This commit is contained in:
parent
e9931fb723
commit
c335d1bdab
2 changed files with 8 additions and 5 deletions
|
@ -106,6 +106,8 @@ def shirtpost():
|
|||
upd['shirt_size'] = size
|
||||
if special_needs:
|
||||
upd['special_needs'] = special_needs
|
||||
else:
|
||||
upd['special_needs'] = None
|
||||
|
||||
if db.session.query(db.exists().where(Hacker.mlh_id == id)).scalar():
|
||||
db.session.query(Hacker).filter(Hacker.mlh_id == id).update(upd)
|
||||
|
@ -276,7 +278,8 @@ def admin():
|
|||
else:
|
||||
majors[hacker['major']] += 1
|
||||
|
||||
#shirt_count[hacker['shirt_size'].split(' - ')[1].lower()] += 1
|
||||
if obj.shirt_size in shirt_count:
|
||||
shirt_count[obj.shirt_size] += 1
|
||||
|
||||
hackers.append({
|
||||
'checked_in': obj.checked_in,
|
||||
|
@ -288,8 +291,8 @@ def admin():
|
|||
'first_name': hacker['first_name'],
|
||||
'last_name': hacker['last_name'],
|
||||
'phone_number': hacker['phone_number'],
|
||||
#'dietary_restrictions': hacker['dietary_restrictions'],
|
||||
#'special_needs': hacker['special_needs'],
|
||||
'shirt_size': (obj.shirt_size or '').upper(),
|
||||
'special_needs': obj.special_needs,
|
||||
'school': hacker['school']
|
||||
})
|
||||
|
||||
|
|
|
@ -207,7 +207,7 @@
|
|||
<th>Email</th>
|
||||
<th>Name</th>
|
||||
<th>Phone</th>
|
||||
<th>Diet</th>
|
||||
<th>Shirt</th>
|
||||
<th>Special</th>
|
||||
<th>School</th>
|
||||
</tr>
|
||||
|
@ -254,7 +254,7 @@
|
|||
<td>{{ hacker['email'] }}</td>
|
||||
<td>{{ hacker['first_name'] + ' ' + hacker['last_name'] }}</td>
|
||||
<td>{{ hacker['phone_number'] }}</td>
|
||||
<td>{{ hacker['dietary_restrictions'] }}</td>
|
||||
<td>{{ hacker['shirt_size'] }}</td>
|
||||
<td>{{ hacker['special_needs'] }}</td>
|
||||
<td>{{ hacker['school']['name'] }}</td>
|
||||
</tr>
|
||||
|
|
Loading…
Add table
Reference in a new issue