events are updated
This commit is contained in:
@@ -9,7 +9,8 @@ from databases.no_sql_models.validations import DomainViaUser
|
||||
from api_events.events.abstract_class import MethodToEvent, ActionsSchema
|
||||
|
||||
from api_objects.auth.token_objects import EmployeeTokenObject, OccupantTokenObject
|
||||
from api_validations.core_response import return_json_response_from_alchemy
|
||||
from api_validations.core_response import AlchemyJsonResponse
|
||||
|
||||
|
||||
from api_validations.validations_request import (
|
||||
InsertUsers,
|
||||
@@ -43,13 +44,19 @@ class UserListEventMethods(MethodToEvent):
|
||||
user.person_id
|
||||
for user in Users.filter_active(Users.uu_id.in_(people_ids)).data
|
||||
]
|
||||
People.filter_attr = list_options
|
||||
records = People.filter_active(People.id.in_(people_id_list))
|
||||
return return_json_response_from_alchemy(
|
||||
response=records, pagination=list_options
|
||||
return AlchemyJsonResponse(
|
||||
completed=True,
|
||||
message="Users are listed successfully",
|
||||
result=records,
|
||||
)
|
||||
People.filter_attr = list_options
|
||||
records = Users.filter_active(*Users.get_smart_query(list_options.query))
|
||||
return return_json_response_from_alchemy(
|
||||
response=records, pagination=list_options
|
||||
return AlchemyJsonResponse(
|
||||
completed=True,
|
||||
message="Users are listed successfully",
|
||||
result=records,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user