Skip to content

Commit

Permalink
fix selection bug
Browse files Browse the repository at this point in the history
  • Loading branch information
afourmy committed Nov 14, 2018
1 parent 7f1ec3c commit f78dd5f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion eNMS/automation/static/workflowBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ function getWorkflowState() {
}
});
}
setTimeout(getWorkflowState, 50);
setTimeout(getWorkflowState, 1500);
}

$(window).bind('beforeunload', function() {
Expand Down
9 changes: 6 additions & 3 deletions eNMS/base/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from eNMS.base.classes import classes
from eNMS.base.properties import (
boolean_properties,
list_properties,
pretty_names,
property_types
)
Expand Down Expand Up @@ -100,9 +101,11 @@ def wrapper(*a, **kw):
def process_request(function):
def wrapper(*a, **kw):
data = request.form.to_dict()
for key in request.form:
if 'list' in property_types.get(key, ''):
data[key] = request.form.getlist(key)
for property in list_properties:
if property in request.form:
data[property] = request.form.getlist(property)
else:
data[property] = []
for property in boolean_properties:
if property not in request.form:
data[property] = 'off'
Expand Down
8 changes: 8 additions & 0 deletions eNMS/base/properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ def get_custom_properties():
'multiprocessing',
'send_notification'
]
list_properties = [
'devices',
'pools',
'links',
'permissions',
'getters',
'import_export_types'
]
private_properties = ['password', 'enable_password']

base_properties = [
Expand Down

0 comments on commit f78dd5f

Please sign in to comment.