Skip to content

Commit 97ccf1a

Browse files
authored
Merge pull request #315 from Mstrodl/hotfix/freshmen-accounts
Fix 500 on dashboard for non-upgraded accounts
2 parents 9b3fc8f + f366459 commit 97ccf1a

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.8-buster
1+
FROM docker.io/python:3.8-buster
22
MAINTAINER Devin Matte <matted@csh.rit.edu>
33

44
RUN mkdir /opt/conditional

conditional/blueprints/dashboard.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def display_dashboard(user_dict=None):
4444
if ldap_is_intromember(user_dict['account']):
4545
data['freshman'] = get_freshman_data(user_dict['account'].uid)
4646
else:
47-
data['freshman'] = False
47+
data['freshman'] = None
4848

4949
spring = {}
5050
c_meetings = get_cm(user_dict['account'])

conditional/templates/dashboard.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ <h5 class="email">{{username}}@csh.rit.edu</h5>
2929
<div class="row" data-module="masonry">
3030
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
3131

32-
{% if freshman != False %}
32+
{% if freshman %}
3333
<div class="panel panel-default">
3434
<div class="panel-heading">
3535
<h3 class="panel-title">Freshman Evaluations

conditional/util/member.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ def get_freshman_data(user_name):
7575
freshman = {}
7676
freshman_data = FreshmanEvalData.query.filter(FreshmanEvalData.uid == user_name).first()
7777

78+
if freshman_data is None:
79+
return None
7880
freshman['status'] = freshman_data.freshman_eval_result
7981
# number of committee meetings attended
8082
c_meetings = [m.meeting_id for m in

0 commit comments

Comments
 (0)