Commit b3e3f55
fix(controller): guard missing skip_push_update_on_save in register
DeviceRegisterView._update_device_name calls
``device.skip_push_update_on_save()`` when an agent re-registers with a
hostname different from the MAC address. That method is referenced in
the view but is not implemented on the Device model, so every such
re-registration crashes with an HTTP 500:
AttributeError: 'Device' object has no attribute 'skip_push_update_on_save'
This breaks the consistent_registration / factory-reset workflow: a
router that loses its local UUID/key after a firstboot tries to
re-register and gets a 500 error instead of finding its existing record
by consistent_key.
Wrap the call in ``getattr`` so the registration succeeds whether the
helper method exists or not. The actual method can be re-introduced
separately without changing this site.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 5270e09 commit b3e3f55
1 file changed
+9
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
538 | 538 | | |
539 | 539 | | |
540 | 540 | | |
541 | | - | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
542 | 550 | | |
543 | 551 | | |
544 | 552 | | |
| |||
0 commit comments