From b5a2b5607f92973060a2af1555bfe0ffa280945f Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Fri, 30 Jan 2026 13:11:00 -0600 Subject: Fetch and display actual details for phenotypes being deleted. --- uploader/phenotypes/views.py | 8 ++++++-- uploader/templates/phenotypes/confirm-delete-phenotypes.html | 6 ++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/uploader/phenotypes/views.py b/uploader/phenotypes/views.py index 9b635e2..549412b 100644 --- a/uploader/phenotypes/views.py +++ b/uploader/phenotypes/views.py @@ -1260,10 +1260,14 @@ def delete_phenotypes(# pylint: disable=[unused-argument] loglevel=_loglevel) ).either(__handle_error__, proceed_to_job_status) case _: + _phenos = tuple() + if len(xref_ids) > 0: + _phenos = dataset_phenotypes( + conn, population["Id"], dataset["Id"], xref_ids=xref_ids) + return render_template( "phenotypes/confirm-delete-phenotypes.html", species=species, population=population, dataset=dataset, - phenotypes=[{"xref_id": xref_id} - for xref_id in xref_ids]) + phenotypes=_phenos) diff --git a/uploader/templates/phenotypes/confirm-delete-phenotypes.html b/uploader/templates/phenotypes/confirm-delete-phenotypes.html index 3b16698..e6d67c7 100644 --- a/uploader/templates/phenotypes/confirm-delete-phenotypes.html +++ b/uploader/templates/phenotypes/confirm-delete-phenotypes.html @@ -62,8 +62,10 @@ value="{{phenotype.xref_id}}" class="chk-row-select" /> - {{phenotype}} - {{phenotype}} — Description + {{phenotype.xref_id}} + {{phenotype.Post_publication_description or + phenotype.Pre_publication_description or + phenotype.original_description}} {%endfor%} -- cgit 1.4.1