aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wqflask/wqflask/metadata_edits.py4
-rw-r--r--wqflask/wqflask/templates/edit_phenotype.html2
2 files changed, 3 insertions, 3 deletions
diff --git a/wqflask/wqflask/metadata_edits.py b/wqflask/wqflask/metadata_edits.py
index 7a8bbc77..c8d104ea 100644
--- a/wqflask/wqflask/metadata_edits.py
+++ b/wqflask/wqflask/metadata_edits.py
@@ -297,13 +297,13 @@ View the diffs <a href='{url}' target='_blank'>here</a>", "success")
publication_ = {
"pubmed_id": data_.get("pubmed-id"),
"abstract": data_.get("abstract"),
- "authors": data_.get("authors"),
+ "authors": data_.get("authors", ""),
"title": data_.get("title"),
"journal": data_.get("journal"),
"volume": data_.get("volume"),
"pages": data_.get("pages"),
"month": data_.get("month"),
- "year": data_.get("year"),
+ "year": data_.get("year", 0),
}
updated_publications = ""
with database_connection(get_setting("SQL_URI")) as conn:
diff --git a/wqflask/wqflask/templates/edit_phenotype.html b/wqflask/wqflask/templates/edit_phenotype.html
index e8335487..33353c90 100644
--- a/wqflask/wqflask/templates/edit_phenotype.html
+++ b/wqflask/wqflask/templates/edit_phenotype.html
@@ -166,7 +166,7 @@
<label for="month" class="col-sm-3 col-lg-2 control-label text-left">Month</label>
<div class="col-sm-7 col-lg-8">
<select id="month" name="month" class="form-control">
- {%set selected_month =(publication.month or datetime.datetime.strftime("%b"))%}
+ {%set selected_month =(publication.month or datetime.datetime.now().strftime("%b"))%}
{%for smonth, lmonth in (("Jan", "January"),("Feb", "February"),("Mar", "March"),("Apr", "April"),("May", "May"),("Jun", "Jun"),("Jul", "July"),("Aug", "August"),("Sep", "September"),("Oct", "October"),("Nov", "November"),("Dec", "December"))%}
<option value="{{smonth}}"
{%if smonth == selected_month%}