Skip to content

Commit 4e16424

Browse files
committed
[req-change] Made retrieving group id robust
1 parent 1332f2b commit 4e16424

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

openwisp_controller/config/static/config/js/relevant_templates.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ django.jQuery(function ($) {
44
backendFieldSelector = "#id_config-0-backend",
55
orgFieldSelector = "#id_organization",
66
isDeviceGroup = function () {
7-
return window._deviceGroup;
7+
return window._deviceGroupId !== undefined;
88
},
99
templatesFieldName = function () {
1010
return isDeviceGroup() ? "templates" : "config-0-templates";

openwisp_controller/config/templates/admin/device_group/change_form.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
(function ($) {
1313
$(document).ready( function () {
1414
window._relevantTemplateUrl = "{{ relevant_template_url | safe }}";
15-
window._deviceGroup = true;
1615
window._deviceGroupId = "{{ original.pk }}";
1716
window.bindDefaultTemplateLoading();
1817
})

0 commit comments

Comments
 (0)