Skip to content

Commit

Permalink
Merge pull request #3952 from CannonLock/SOFTWARE-5892
Browse files Browse the repository at this point in the history
Fix Project form
  • Loading branch information
mwestphall authored Jun 7, 2024
2 parents 574174d + dde565e commit 298b4ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -867,10 +867,9 @@ def generate_project_yaml():
institution_short_names = {x[1]: x[0] for x in global_data.get_mappings().project_institution.items()}
institutions = []
for institution in institution_api_data:
institutions.append((institution['id'], institution['name'], institution_short_names.get(institution['name'], "")))
institutions.append((institution_short_names.get(institution['name'], ""), institution['name']))

def render_form(**kwargs):
institutions = list(global_data.get_mappings().project_institution.items())
session.pop("form_data", None)

return render_template(
Expand Down
2 changes: 1 addition & 1 deletion src/templates/generate_project_yaml.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ Project YAML Generator
function updateProjectName(){
project_name_node.readOnly = false
if(!(pi_institution_node.value in institutions) || !pi_last_name_node.value){ return }
if(!(pi_institution_node.value in institutions) || !institutions[pi_institution_node.value] || !pi_last_name_node.value){ return }
let pi_institution = institutions[pi_institution_node.value]
let pi_last_name = pi_last_name_node.value
Expand Down

0 comments on commit 298b4ba

Please sign in to comment.