aboutsummaryrefslogtreecommitdiff
path: root/qc_app/upload
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-02-07 16:23:43 +0300
committerFrederick Muriuki Muriithi2024-02-07 16:23:43 +0300
commit824ccc82d074c57052972ef676ecf598781ca7e4 (patch)
tree5e5819319fdf39fd39445917a25980c34e10bcb5 /qc_app/upload
parent75bac06965ddf4ff48135ad4a29beba894c0bae4 (diff)
downloadgn-uploader-824ccc82d074c57052972ef676ecf598781ca7e4.tar.gz
ShortName is optional, remove check and set default
The ShortName is optional, and can be set to the same value as Name. This commit removes the check that made it mandatory.
Diffstat (limited to 'qc_app/upload')
-rw-r--r--qc_app/upload/rqtl2.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/qc_app/upload/rqtl2.py b/qc_app/upload/rqtl2.py
index 69f18fe..9d787e1 100644
--- a/qc_app/upload/rqtl2.py
+++ b/qc_app/upload/rqtl2.py
@@ -288,16 +288,14 @@ def create_geno_dataset(species_id: int, population_id: int):
if not bool(request.form.get("dataset-fullname")):
flash("You must provide the dataset full name", errorclasses)
return sgeno_page
- if not bool(request.form.get("dataset-shortname")):
- flash("You must provide the dataset short name", errorclasses)
- return sgeno_page
public = 2 if request.form.get("dataset-public") == "on" else 0
with conn.cursor(cursorclass=DictCursor) as cursor:
+ datasetname = request.form["dataset-name"]
new_dataset = {
- "name": request.form.get("dataset-name"),
+ "name": datasetname,
"fname": request.form.get("dataset-fullname"),
- "sname": request.form.get("dataset-shortname"),
+ "sname": request.form.get("dataset-shortname") or datasetname,
"today": date.today().isoformat(),
"pub": public,
"isetid": population_id