get smart query removed
This commit is contained in:
@@ -43,7 +43,7 @@ class CompanyListEventMethods(MethodToEvent):
|
||||
).query
|
||||
Companies.filter_attr = list_options
|
||||
records = Companies.filter_active(
|
||||
*Companies.get_smart_query(list_options.query)
|
||||
*Companies.valid_record_args(Companies)
|
||||
)
|
||||
return AlchemyJsonResponse(
|
||||
completed=True,
|
||||
|
||||
@@ -31,7 +31,6 @@ class DepartmentListEventMethods(MethodToEvent):
|
||||
):
|
||||
Departments.filter_attr = list_options
|
||||
records = Departments.filter_active(
|
||||
*Departments.get_smart_query(smart_query=list_options.query),
|
||||
Departments.company_id == token_dict.selected_company.company_id,
|
||||
)
|
||||
return AlchemyJsonResponse(
|
||||
|
||||
@@ -30,7 +30,6 @@ class DutiesListEventMethods(MethodToEvent):
|
||||
):
|
||||
Duties.filter_attr = list_options
|
||||
records = Duties.filter_all(
|
||||
*Duties.get_smart_query(smart_query=list_options.query),
|
||||
Duties.company_id == token_dict.selected_company.company_id,
|
||||
)
|
||||
return {
|
||||
|
||||
@@ -27,8 +27,9 @@ class DutyListEventMethods(MethodToEvent):
|
||||
list_options: ListOptions,
|
||||
token_dict: EmployeeTokenObject,
|
||||
):
|
||||
Duty.filter_attr = list_options
|
||||
records = Duty.filter_active(
|
||||
*Duty.get_smart_query(list_options.query),
|
||||
*Duty.valid_record_args(Duty)
|
||||
)
|
||||
return AlchemyJsonResponse(
|
||||
completed=True,
|
||||
|
||||
@@ -31,7 +31,6 @@ class EmployeeListEventMethods(MethodToEvent):
|
||||
):
|
||||
Employees.filter_attr = list_options
|
||||
records = Employees.filter_active(
|
||||
*Employees.get_smart_query(smart_query=list_options.query),
|
||||
Employees.company_id == token_dict.selected_company.company_id,
|
||||
)
|
||||
return AlchemyJsonResponse(
|
||||
|
||||
@@ -26,7 +26,7 @@ class StaffListEventMethods(MethodToEvent):
|
||||
def staff_list(cls, list_options: ListOptions, token_dict: EmployeeTokenObject):
|
||||
Staff.filter_attr = list_options
|
||||
records = Staff.filter_active(
|
||||
*Staff.get_smart_query(smart_query=list_options.query),
|
||||
*Staff.valid_record_args(Staff)
|
||||
)
|
||||
return AlchemyJsonResponse(
|
||||
completed=True,
|
||||
|
||||
Reference in New Issue
Block a user