Skip to content

Commit

Permalink
Add multiselect input management
Browse files Browse the repository at this point in the history
  • Loading branch information
maricaantonacci committed May 18, 2022
1 parent 790bf07 commit 72bc497
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions app/deployments/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,21 @@ def createdep():
if value["attribute"] == "sub":
inputs[key] = session['userid']

if value["type"] == "multiselect":
if key in inputs:
try:
lval = request.form.getlist(key)
if 'format' in value and value['format']['type'] == 'string':
inputs[key] = value['format']['delimiter'].join(lval)
else:
inputs[key] = lval
except Exception as e:
app.logger.error("Error processing input {}: {}".format(key,e))
flash(
" The deployment submission failed with: {}. Please try later or contact the admin(s): {}".format(
e, app.config.get('SUPPORT_EMAIL')), 'danger')
doprocess = False


if swift and swift_map:
for k, v in swift_map.items():
Expand Down

0 comments on commit 72bc497

Please sign in to comment.