fix(settings): Fix some input_formatted cases.
This commit is contained in:
@@ -259,7 +259,7 @@ class TimerOptions(SettingGroup):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def input_formatted(self):
|
def input_formatted(self):
|
||||||
return str(int(self._data // 60)) if self._data else None
|
return str(int(self._data // 60)) if self._data else '25'
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
async def _parse_string(cls, parent_id, string, **kwargs):
|
async def _parse_string(cls, parent_id, string, **kwargs):
|
||||||
@@ -300,7 +300,7 @@ class TimerOptions(SettingGroup):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def input_formatted(self):
|
def input_formatted(self):
|
||||||
return str(int(self._data // 60)) if self._data else None
|
return str(int(self._data // 60)) if self._data else '5'
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
async def _parse_string(cls, parent_id, string, **kwargs):
|
async def _parse_string(cls, parent_id, string, **kwargs):
|
||||||
|
|||||||
@@ -396,7 +396,7 @@ class InteractiveSetting(BaseSetting[ParentID, SettingData, SettingValue]):
|
|||||||
return TextInput(
|
return TextInput(
|
||||||
label=self.display_name,
|
label=self.display_name,
|
||||||
placeholder=self.accepts,
|
placeholder=self.accepts,
|
||||||
default=self.input_formatted[:4000],
|
default=self.input_formatted[:4000] if self.input_formatted else None,
|
||||||
required=self._required
|
required=self._required
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user