Skip to content

Commit e41f676

Browse files
authored
Prevent model issues when preset 0 doesn't exists (#489)
1 parent abeb437 commit e41f676

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
@@ -660,7 +660,7 @@ def update_from_dict(self, data: dict) -> Device:
660660
# we split those out, so we can handle those correctly.
661661

662662
# Nobody cares about 0.
663-
_presets.pop("0")
663+
_presets.pop("0", None)
664664

665665
presets = [
666666
Preset.from_dict(int(preset_id), preset, self.effects, self.palettes)

0 commit comments

Comments
 (0)