diff --git a/server/src/ledgrab/api/routes/devices.py b/server/src/ledgrab/api/routes/devices.py index f704479..af16a6b 100644 --- a/server/src/ledgrab/api/routes/devices.py +++ b/server/src/ledgrab/api/routes/devices.py @@ -640,11 +640,18 @@ async def update_device( icon_color=update_data.icon_color, ) - # Sync connection info in processor manager + # Sync connection info in processor manager. + # + # When a PATCH omits `url` (rename / icon-only edit) `normalized_url` + # is None — fall back to the existing record's URL so the processor + # is always told the current address, otherwise it silently keeps + # whatever it had cached (or worse, treats None as "unconfigured" + # and refuses to re-sync). + effective_url = normalized_url if normalized_url is not None else existing.url try: manager.update_device_info( device_id, - device_url=normalized_url, + device_url=effective_url, led_count=normalized_led_count, baud_rate=update_data.baud_rate, )