save_field() submits sub_dev_id correctly

This commit is contained in:
iou1name 2019-10-24 13:02:59 -04:00
parent 56cbba2038
commit 4e40fbdfb6

View File

@ -71,7 +71,7 @@ function save_field(field) {
let device_id = field.parentElement.id; let device_id = field.parentElement.id;
let sub_dev_id; let sub_dev_id;
if (field.parentElement.className.includes('sub_device')) { if (field.parentElement.className.includes('sub_device')) {
sub_dev_id = device_id; sub_dev_id = field.parentElement.children[0].textContent;
device_id = field.parentElement.parentElement.parentElement.id; device_id = field.parentElement.parentElement.parentElement.id;
} else { } else {
sub_dev_id = ''; sub_dev_id = '';