mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Core: Silently fix invalid yaml option for Toggles (#3179)
This commit is contained in:
@@ -384,7 +384,8 @@ class Toggle(NumericOption):
|
|||||||
default = 0
|
default = 0
|
||||||
|
|
||||||
def __init__(self, value: int):
|
def __init__(self, value: int):
|
||||||
assert value == 0 or value == 1, "value of Toggle can only be 0 or 1"
|
# if user puts in an invalid value, make it valid
|
||||||
|
value = int(bool(value))
|
||||||
self.value = value
|
self.value = value
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
Reference in New Issue
Block a user