From 09b4b70aae5e65516c766882118a897c75a44974 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Fri, 12 Apr 2024 09:13:20 +0300 Subject: Provide tissue-id details to probeset dataset templates --- qc_app/db/tissues.py | 5 ++--- qc_app/templates/rqtl2/create-probe-dataset-success.html | 1 + qc_app/templates/rqtl2/select-probeset-dataset.html | 4 +++- qc_app/upload/rqtl2.py | 14 ++++++++++++++ 4 files changed, 20 insertions(+), 4 deletions(-) (limited to 'qc_app') diff --git a/qc_app/db/tissues.py b/qc_app/db/tissues.py index 062e824..9fe7bab 100644 --- a/qc_app/db/tissues.py +++ b/qc_app/db/tissues.py @@ -11,11 +11,10 @@ def all_tissues(conn: mdb.Connection) -> tuple[dict, ...]: return tuple(dict(row) for row in cursor.fetchall()) -def tissue_by_id(conn: mdb.Connection, tissueid: int) -> Optional[dict]: +def tissue_by_id(conn: mdb.Connection, tissueid) -> Optional[dict]: """Retrieve a tissue by its ID""" with conn.cursor(cursorclass=DictCursor) as cursor: - cursor.execute("SELECT * FROM Tissue WHERE Id=%s", - (tissueid,)) + cursor.execute("SELECT * FROM Tissue WHERE Id=%s", (tissueid,)) result = cursor.fetchone() if bool(result): return dict(result) diff --git a/qc_app/templates/rqtl2/create-probe-dataset-success.html b/qc_app/templates/rqtl2/create-probe-dataset-success.html index 33612c4..71ff7ac 100644 --- a/qc_app/templates/rqtl2/create-probe-dataset-success.html +++ b/qc_app/templates/rqtl2/create-probe-dataset-success.html @@ -47,6 +47,7 @@ value="{{population.InbredSetId}}" /> + diff --git a/qc_app/templates/rqtl2/select-probeset-dataset.html b/qc_app/templates/rqtl2/select-probeset-dataset.html index d00d6aa..0b2a8f2 100644 --- a/qc_app/templates/rqtl2/select-probeset-dataset.html +++ b/qc_app/templates/rqtl2/select-probeset-dataset.html @@ -18,7 +18,7 @@ species_id=species.SpeciesId, population_id=population.Id)}}" id="frm:select-probeset-dataset"> - {{flash_messages("error-rqtl2-select-probeset-dataset")}} + {{flash_messages("error-rqtl2")}} +