about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-07-17 10:35:25 +0300
committerFrederick Muriuki Muriithi2023-07-17 10:40:52 +0300
commit1bbb0430732b7fa5102d7dcbda80ebda252f5424 (patch)
tree1a7a6a8a9e8107c276a35c75421a7f13971fce56
parent8c4cd623c275f4903caa4caf2cbd8f7d207529d3 (diff)
downloadgenenetwork2-1bbb0430732b7fa5102d7dcbda80ebda252f5424.tar.gz
Enable deletion of sample values.
-rw-r--r--wqflask/wqflask/metadata_edits.py2
-rw-r--r--wqflask/wqflask/templates/edit_phenotype.html3
2 files changed, 4 insertions, 1 deletions
diff --git a/wqflask/wqflask/metadata_edits.py b/wqflask/wqflask/metadata_edits.py
index 008489ce..501ddba0 100644
--- a/wqflask/wqflask/metadata_edits.py
+++ b/wqflask/wqflask/metadata_edits.py
@@ -834,7 +834,7 @@ def create_delta_csv(base_csv, form_data, sample_list):
                 for field in ["value", "error", "n_cases"]:
                     the_value = form_data.get(f"{field}:{sample['name']}")
                     if the_value:
-                        if is_a_number(the_value):
+                        if is_a_number(the_value) or the_value.lower() == "x":
                             new_line_items.append(the_value)
                             continue
                     new_line_items.append(sample[field])
diff --git a/wqflask/wqflask/templates/edit_phenotype.html b/wqflask/wqflask/templates/edit_phenotype.html
index 240c5e60..e8335487 100644
--- a/wqflask/wqflask/templates/edit_phenotype.html
+++ b/wqflask/wqflask/templates/edit_phenotype.html
@@ -224,6 +224,9 @@
     </div>
 
     <div style="padding-top: 20px;">
+      <p class="text-info" style="padding-left: 5em;">
+	<strong>Type "x" to delete a value.</strong>
+      </p>
         <table style="width: 500px;" class="table table-hover table-striped table-bordered left-float">
             <thead>
                 <th></th>