aboutsummaryrefslogtreecommitdiff
path: root/qc_app/upload
diff options
context:
space:
mode:
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