Add choices_bool to FilterSeconds

This commit is contained in:
tcely
2025-08-23 03:43:22 -04:00
committed by GitHub
parent 60cc5b16f6
commit b4d757e7c1

View File

@@ -47,8 +47,12 @@ class FileExtension(models.TextChoices):
class FilterSeconds(models.IntegerChoices):
MIN = 1, _('Minimum Length')
MAX = 0, _('Maximum Length')
MIN = True, _('Minimum Length')
MAX = False, _('Maximum Length')
@classmethod
def choices_bool(cls):
return [ (bool(k), v,) for k, v in cls.choices ]
class IndexSchedule(models.IntegerChoices):