Fix issue when editing org without IP range.
Stupid JavaScript ''.split('\n') results in Array('') instead of Array().
This commit is contained in:
parent
6a17949fdf
commit
840e8ba29b
@ -300,13 +300,17 @@ script.
|
||||
if (org_roles_str.length) org_roles = org_roles_str.split(/\s/);
|
||||
{% endif %}
|
||||
|
||||
var ipr = $form.find('*[name="ip_ranges"]').val().trim();
|
||||
if (ipr == '') ip_ranges = Array();
|
||||
else ip_ranges = ipr.split(/\s/);
|
||||
|
||||
patchOrganization({
|
||||
op: 'edit-from-web',
|
||||
name: new_name,
|
||||
description: $form.find('*[name="description"]').val(),
|
||||
website: $form.find('*[name="website"]').val(),
|
||||
location: $form.find('*[name="location"]').val(),
|
||||
ip_ranges: $form.find('*[name="ip_ranges"]').val().trim().split('\n'),
|
||||
ip_ranges: ip_ranges,
|
||||
{% if can_super_edit %}
|
||||
seat_count: parseInt($form.find('*[name="seat_count"]').val()),
|
||||
org_roles: org_roles,
|
||||
|
Loading…
x
Reference in New Issue
Block a user