From 4e40fbdfb6017f70fc4fde3a4f9970cb66e0ea7d Mon Sep 17 00:00:00 2001 From: iou1name Date: Thu, 24 Oct 2019 13:02:59 -0400 Subject: [PATCH] save_field() submits sub_dev_id correctly --- static/juice.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/juice.js b/static/juice.js index 7045383..e1de1e7 100644 --- a/static/juice.js +++ b/static/juice.js @@ -71,7 +71,7 @@ function save_field(field) { let device_id = field.parentElement.id; let sub_dev_id; 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; } else { sub_dev_id = '';