From 84b8294ee509d6bb2c8dea463795578764730196 Mon Sep 17 00:00:00 2001 From: Mikko Heikkinen Date: Fri, 3 Jan 2025 01:13:12 +0200 Subject: [PATCH] Prevent editing species of draft challenges --- app/controllers/participation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/participation.py b/app/controllers/participation.py index c56573f..3b23e41 100644 --- a/app/controllers/participation.py +++ b/app/controllers/participation.py @@ -11,9 +11,9 @@ def make_species_html(id, fin, swe, sci, min_date, max_date, date, challenge_status): - # Readonly if participation is closed + # Readonly if participation is closed or draft readonly_value = "" - if "closed" == challenge_status: + if challenge_status != "open": readonly_value = "readonly" id_html = id.replace(".", "_").replace(" ", "")