fix: use default value notation instead of if None statement in __post_init__

This commit is contained in:
Jann Stute
2024-11-28 19:00:53 +01:00
parent 7c43686823
commit f9bf7a7eae

View File

@@ -75,8 +75,8 @@ class FilterState:
"""Represent a state of the Library grid view."""
# these should remain
page_index: int | None = None
page_size: int | None = None
page_index: int | None = 0
page_size: int | None = 500
search_mode: SearchMode = SearchMode.AND # TODO this can be removed?
# these should be erased on update
@@ -101,11 +101,6 @@ class FilterState:
else:
self.name = self.name and self.name.strip()
if self.page_index is None: # TODO QTLANG can this just be a default value?
self.page_index = 0
if self.page_size is None: # TODO QTLANG can this just be a default value?
self.page_size = 500
@property
def summary(self):
"""Show query summary."""