Skip to content

Commit 378f3be

Browse files
committed
[fix] Use continue instead of return in manage_devices_group_templates
The loop in manage_devices_group_templates used `return` when a device had no config, which aborted processing of all remaining devices in the batch. Changed to `continue` so that devices without a config are skipped individually while the rest of the batch is still processed. Fixes silent configuration drift when batch-changing device groups where some devices lack a config object.
1 parent f3c99c4 commit 378f3be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

openwisp_controller/config/base/device.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ def manage_devices_group_templates(cls, device_ids, old_group_ids, group_id):
504504
config_created = hasattr(device, "config")
505505
if not config_created:
506506
# device has no config (device group has no templates)
507-
return
507+
continue
508508
group_templates = Template.objects.none()
509509
if group_id:
510510
group = DeviceGroup.objects.get(pk=group_id)

0 commit comments

Comments
 (0)