aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/metadata_edits.py5
-rw-r--r--wqflask/wqflask/templates/edit_phenotype.html2
2 files changed, 5 insertions, 2 deletions
diff --git a/wqflask/wqflask/metadata_edits.py b/wqflask/wqflask/metadata_edits.py
index d24a3098..59cc3083 100644
--- a/wqflask/wqflask/metadata_edits.py
+++ b/wqflask/wqflask/metadata_edits.py
@@ -149,7 +149,7 @@ def display_phenotype_metadata(dataset_id: str, name: str):
name=name,
resource_id=request.args.get("resource-id"),
version=os.environ.get("GN_VERSION"),
- )
+ dataset_name=request.args["dataset_name"])
@metadata_edit.route("/traits/<name>")
@@ -242,6 +242,7 @@ def update_phenotype(dataset_id: str, name: str):
return redirect(
f"/datasets/{dataset_id}/traits/{name}"
f"?resource-id={request.args.get('resource-id')}"
+ f"&dataset_name={request.args['dataset_name']}"
)
# Edge case where the csv file has not been edited!
if not any(diff_data.values()):
@@ -251,6 +252,7 @@ def update_phenotype(dataset_id: str, name: str):
return redirect(
f"/datasets/{dataset_id}/traits/{name}"
f"?resource-id={request.args.get('resource-id')}"
+ f"&dataset_name={request.args['dataset_name']}"
)
with open(
@@ -391,6 +393,7 @@ View the diffs <a href='{url}' target='_blank'>here</a>", "success")
return redirect(
f"/datasets/{dataset_id}/traits/{name}"
f"?resource-id={request.args.get('resource-id')}"
+ f"&dataset_name={request.args['dataset_name']}"
)
diff --git a/wqflask/wqflask/templates/edit_phenotype.html b/wqflask/wqflask/templates/edit_phenotype.html
index d67468c3..813947d6 100644
--- a/wqflask/wqflask/templates/edit_phenotype.html
+++ b/wqflask/wqflask/templates/edit_phenotype.html
@@ -17,7 +17,7 @@
<small><a href="{{url_for('metadata_edit.show_history', dataset_id=dataset_id, name=name)}}" target="_blank">[View History]</a></small>
</div>
- <form id="edit-form" class="form-horizontal" method="post" action="/datasets/{{dataset_id}}/traits/{{ publish_xref.id_ }}?resource-id={{ resource_id }}" enctype='multipart/form-data'>
+ <form id="edit-form" class="form-horizontal" method="post" action="/datasets/{{dataset_id}}/traits/{{publish_xref.id_}}?resource-id={{resource_id}}&dataset_name={{dataset_name}}" enctype='multipart/form-data'>
<div class="form-group">
<div class="controls left-block col-sm-8 col-lg-8" style="width: max-content;">
<input name="inbred-set-id" class="changed" type="hidden" value="{{ publish_xref.inbred_set_id }}"/>