Development

This commit is contained in:
Matthew Grotke 2026-05-27 01:08:49 -04:00
parent 9c395ab1e8
commit c0230f25d8
3 changed files with 13 additions and 2 deletions

View file

@ -126,7 +126,8 @@ def networklayout_tablevlans_edit():
flash(f"'{raw_ip}' is not a valid IP address.", 'error')
return redirect(VIEW)
identity_ips.append(clean)
identity_descs = request.form.get('server_identity_descriptions', '').splitlines()
identity_descs = request.form.get('server_identity_descriptions', '').splitlines()
identity_hostnames = request.form.get('server_identity_hostnames', '').splitlines()
subnet_mask_raw = request.form.get('subnet_mask')
if subnet_mask_raw is not None:
@ -187,6 +188,11 @@ def networklayout_tablevlans_edit():
entry['description'] = desc
else:
entry.pop('description', None)
hostname = identity_hostnames[i].strip() if i < len(identity_hostnames) else ''
if hostname:
entry['hostname'] = hostname
else:
entry.pop('hostname', None)
new_identities.append(entry)
before = {k: existing.get(k) for k in _VLAN_FIELDS}