diff --git a/airscore/core/frontendUtils.py b/airscore/core/frontendUtils.py index 747fc90d..31728981 100644 --- a/airscore/core/frontendUtils.py +++ b/airscore/core/frontendUtils.py @@ -1327,8 +1327,10 @@ def get_comp_info(compid: int, task_ids=None): with db_session() as db: non_scored_tasks = ( - db.query(t.task_id.label('id'), - t.task_name, t.date, t.task_type, t.opt_dist, t.training, t.comment, t.cancelled) + db.query( + t.task_id.label('id'), + t.task_name, t.date, t.task_type, t.opt_dist, + t.training, t.comment, t.stopped_time, t.cancelled) .filter_by(comp_id=compid) .order_by(t.date.desc()) .all() diff --git a/airscore/public/views.py b/airscore/public/views.py index 181dfb07..23163115 100644 --- a/airscore/public/views.py +++ b/airscore/public/views.py @@ -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) diff --git a/airscore/templates/public/comp.html b/airscore/templates/public/comp.html index db5cf263..ac3ac32b 100644 --- a/airscore/templates/public/comp.html +++ b/airscore/templates/public/comp.html @@ -50,7 +50,7 @@

No task has been set yet

{{ task.task_name }}

{{ task.date }} {% if task.training %}(TRAINING DAY){% endif %}
- {% 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' %} @@ -94,7 +94,7 @@
{{ task.comment }}
Tracks Status

{% endif %} - {% elif task.status is not in ["Task not set", "CANCELLED"] %} + {% elif task.status is not in ['Task not set', 'CANCELLED', 'STOPPED / NOT VALID'] %}

IGC Zip File