Skip to content

Commit b33aa29

Browse files
authored
Gracefully handle missing preset name (#356)
1 parent 3230a35 commit b33aa29

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/wled/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ def from_dict(
460460

461461
return Preset(
462462
main_segment=main_segment,
463-
name=data["n"],
463+
name=data.get("n", str(preset_id)),
464464
on=data.get("on", False),
465465
preset_id=preset_id,
466466
quick_label=data.get("ql"),

0 commit comments

Comments
 (0)