Skip to content

Commit

Permalink
added STOPPED / NOT VALID case
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonio Golfari committed Jun 4, 2024
1 parent acad134 commit 7bfbbaf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion airscore/public/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,8 @@ def competition(compid: int):
'''tracks download status'''
task['tracks_status'] = frontendUtils.task_has_valid_results(task['id'])
if task['cancelled']:
task['status'] = "CANCELLED"
# it could be cancelled or stopped but not valid
task['status'] = "CANCELLED" if not task['stopped_time'] else "STOPPED / NOT VALID"

all_tasks.append(task)
all_tasks.sort(key=lambda k: k['date'], reverse=True)
Expand Down
2 changes: 1 addition & 1 deletion airscore/templates/public/comp.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ <h1> No task has been set yet</h1>
<div class='col'>
<h3 id='task_hd'>{{ task.task_name }}</h3>
<h5>{{ task.date }} {% if task.training %}<span class = 'text-info'>(TRAINING DAY)</span>{% endif %}</h5>
{% if task.status == 'CANCELLED' %}
{% if task.status in ['CANCELLED', 'STOPPED / NOT VALID'] %}
{% set class = 'text-danger' %}
{% elif task.status is in ['Not yet scored', 'Task not set'] %}
{% set class = 'text-warning' %}
Expand Down

0 comments on commit 7bfbbaf

Please sign in to comment.