diff --git a/openwisp_controller/config/controller/views.py b/openwisp_controller/config/controller/views.py index 3dc714c0c..38ce6a689 100644 --- a/openwisp_controller/config/controller/views.py +++ b/openwisp_controller/config/controller/views.py @@ -475,7 +475,13 @@ def _update_device_name(self, request, device): normalized_name = name.replace(":", "").replace("-", "").lower() if normalized_name != normalized_mac: device.name = name - device.skip_push_update_on_save() + # NOTE: ``device.skip_push_update_on_save()`` is defined on + # AbstractDevice, but we guard the call defensively so that + # subclasses or older installations that may lack the method + # do not crash during factory-reset re-registration. + skip = getattr(device, "skip_push_update_on_save", None) + if callable(skip): + skip() class GetVpnView(SingleObjectMixin, View):