Options: fix corner case where Toggle.value and Toggle.__int__ would be bool
Which lead to a connect failure in Raft
This commit is contained in:
parent
4c94bb0ad5
commit
cc8ce32c61
|
@ -298,7 +298,7 @@ class Toggle(NumericOption):
|
||||||
if type(data) == str:
|
if type(data) == str:
|
||||||
return cls.from_text(data)
|
return cls.from_text(data)
|
||||||
else:
|
else:
|
||||||
return cls(data)
|
return cls(int(data))
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_option_name(cls, value):
|
def get_option_name(cls, value):
|
||||||
|
|
Loading…
Reference in New Issue