Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class ActualEmployeeStatusSelectFilter(BaseSelectorFilter):
- """Определяет логику фильтрации поля 'Статус пользователя (фактический)' для select."""
- def __init__(self, request, search_query, limit, is_exact, page):
- self.search_query = search_query
- self.limit = limit
- self.is_exact = is_exact
- self.page = page
- self.field_name = 'actual_employee_status'
- self.reference_book = {
- self.field_name: PersonnelAccounting.BASE_REFERENCE_BOOKS.get(self.field_name),
- }
- # if not self.search_query[0]:
- # get_or_create_reference_books(self.reference_book)
- super().__init__(request)
- def get_initial_items(self):
- return get_queryset_for_field_with_reference_book(
- reference_books=self.reference_book,
- field_name=self.field_name,
- queryset=RecordInReferenceBook.objects.all(),
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement