Skip to content

Commit

Permalink
dashboard: fix 500 on non-upgraded account
Browse files Browse the repository at this point in the history
  • Loading branch information
Mstrodl committed Sep 11, 2021
1 parent 9b3fc8f commit f366459
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
@@ -1,4 +1,4 @@
FROM python:3.8-buster
FROM docker.io/python:3.8-buster
MAINTAINER Devin Matte <matted@csh.rit.edu>

RUN mkdir /opt/conditional
Expand Down
2 changes: 1 addition & 1 deletion conditional/blueprints/dashboard.py
Expand Up @@ -44,7 +44,7 @@ def display_dashboard(user_dict=None):
if ldap_is_intromember(user_dict['account']):
data['freshman'] = get_freshman_data(user_dict['account'].uid)
else:
data['freshman'] = False
data['freshman'] = None

spring = {}
c_meetings = get_cm(user_dict['account'])
Expand Down
2 changes: 1 addition & 1 deletion conditional/templates/dashboard.html
Expand Up @@ -29,7 +29,7 @@ <h5 class="email">{{username}}@csh.rit.edu</h5>
<div class="row" data-module="masonry">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">

{% if freshman != False %}
{% if freshman %}
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Freshman Evaluations
Expand Down
2 changes: 2 additions & 0 deletions conditional/util/member.py
Expand Up @@ -75,6 +75,8 @@ def get_freshman_data(user_name):
freshman = {}
freshman_data = FreshmanEvalData.query.filter(FreshmanEvalData.uid == user_name).first()

if freshman_data is None:
return None
freshman['status'] = freshman_data.freshman_eval_result
# number of committee meetings attended
c_meetings = [m.meeting_id for m in
Expand Down

0 comments on commit f366459

Please sign in to comment.