about summary refs log tree commit diff
path: root/uploader/phenotypes
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2026-01-23 12:54:56 -0600
committerFrederick Muriuki Muriithi2026-01-23 13:00:08 -0600
commit770a3171af257ec689ae14ca48fb5c6ac7be9812 (patch)
tree53f7a2c4bb02dffc5584bed01a275380a1c2c5c9 /uploader/phenotypes
parentc689c97b2a7003a475f35f786710a7591631b06c (diff)
downloadgn-uploader-770a3171af257ec689ae14ca48fb5c6ac7be9812.tar.gz
Initialise UI for deletion of phenotypes.
Diffstat (limited to 'uploader/phenotypes')
-rw-r--r--uploader/phenotypes/views.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/uploader/phenotypes/views.py b/uploader/phenotypes/views.py
index 60d5775..aaccf18 100644
--- a/uploader/phenotypes/views.py
+++ b/uploader/phenotypes/views.py
@@ -1155,3 +1155,25 @@ def rerun_qtlreaper(# pylint: disable=[unused-argument]
 def rerun_qtlreaper_success_handler(job):
     """Handle success (re)running QTLReaper script."""
     return return_to_dataset_view_handler(job, "QTLReaper ran successfully!")
+
+
+@phenotypesbp.route(
+    "<int:species_id>/populations/<int:population_id>/phenotypes/datasets"
+    "/<int:dataset_id>/delete",
+    methods=["GET", "POST"])
+@require_login
+@with_dataset(
+    species_redirect_uri="species.populations.phenotypes.index",
+    population_redirect_uri="species.populations.phenotypes.select_population",
+    redirect_uri="species.populations.phenotypes.list_datasets")
+def delete_phenotypes(# pylint: disable=[unused-argument]
+        species: dict,
+        population: dict,
+        dataset: dict,
+        **kwargs
+):
+    """Delete the specified phenotype data."""
+    if request.method == "GET":
+        return "Would confirm deletion."
+
+    return "Would delete!"