diff options
author | Frederick Muriuki Muriithi | 2024-02-07 16:23:43 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2024-02-07 16:23:43 +0300 |
commit | 824ccc82d074c57052972ef676ecf598781ca7e4 (patch) | |
tree | 5e5819319fdf39fd39445917a25980c34e10bcb5 | |
parent | 75bac06965ddf4ff48135ad4a29beba894c0bae4 (diff) | |
download | gn-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.
-rw-r--r-- | qc_app/upload/rqtl2.py | 8 |
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 |