mirror of
https://github.com/Donkie/Spoolman.git
synced 2026-10-22 10:02:17 -05:00
The REST endpoints serialize with response_model_exclude_none=True (unset fields are omitted), but websocket events were serialized with a plain .json() that includes unset fields as explicit null. The spool list fills a missing price from the filament price only when it is `undefined`, so a live update carrying `price: null` (e.g. after a quick weight adjust) blanked the price column until a full page reload. Fixed on both sides so the two serialization paths can no longer drift: - Server: websocket payloads now use exclude_none=True (spoolman/ws.py), giving live updates and REST responses an identical shape. Note this is a small websocket wire-format change external consumers will see: unset fields are now omitted instead of sent as null, matching REST. - Client: collapseSpool and the price column now fall back for both `null` and `undefined`, keeping the list resilient regardless of serialization.