Skip to content

Commit 8b1231d

Browse files
committed
fix red banner
1 parent 79228f8 commit 8b1231d

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

main.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ def dashboard():
569569
app.logger.info('The user %s is in the dashboard' % session['Username'])
570570

571571
session.permanent = True
572-
error = success = status()
572+
error, success = status()
573573
people_list = PersonelModel().get_all()
574574
user_admin = [session['Username'], False]
575575
if session['Username'] in ADMIN:
@@ -621,7 +621,7 @@ def user(uid):
621621
app.logger.info('The user {0} is trying to edit the profile id {1}'.format(
622622
session['Username'], uid))
623623
session.permanent = True
624-
error = success = status()
624+
error, success = status()
625625
person = PersonelModel().get_all_from_id(uid)
626626

627627
if session['Username'] not in ADMIN and person[8] != session['Username']:
@@ -739,7 +739,8 @@ def status():
739739
"""
740740
Return if there was an error or successful event
741741
"""
742-
error = success = False
742+
error = False
743+
success = False
743744
if 'ERROR' in session:
744745
error = session['ERROR']
745746
session.pop('ERROR', None)
@@ -755,7 +756,7 @@ def datathon():
755756
"""
756757
Page to handle datathon access to MIMIC and eICU
757758
"""
758-
error = success = status()
759+
error, success = status()
759760
model = DatathonModel()
760761

761762
if request.method == 'POST' and request.form.get("remove_id"):
@@ -767,8 +768,8 @@ def datathon():
767768
datathon_info[3])
768769

769770
datathons = model.get_all()
770-
return render_template('admin/datathons.html', Error=error,
771-
Success=success, datathons=datathons)
771+
return render_template('admin/datathons.html', error=error,
772+
success=success, datathons=datathons)
772773

773774

774775
@app.route("/datathon_add", methods=['POST', 'GET'])

templates/admin/datathons.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,20 @@
1111
<body data-spy="scroll" data-target=".navbar-fixed-top" >
1212
{% include 'navbar.html'%}
1313
<!-- - - - - - - - - - - - - - - - - - - - - - - START OF NEWS - - - - - - - - - - - - - - - - - - - - - - -->
14-
{% if Error %}
14+
{% if error %}
1515
<div class="alert alert-danger alert-dismissible fade show" role="alert">
1616
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
1717
<span aria-hidden="true">&times;</span>
1818
</button>
19-
<strong>{{Error}}</strong>
19+
<strong>{{ error }}</strong>
2020
</div>
2121
{% endif%}
2222
{% if Success %}
2323
<div class="alert alert-success alert-dismissible fade show" role="alert">
2424
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
2525
<span aria-hidden="true">&times;</span>
2626
</button>
27-
<strong>{{Success}}</strong>
27+
<strong>{{ success }}</strong>
2828
</div>
2929
{% endif%}
3030
<section id="dashboard">

0 commit comments

Comments
 (0)