orm get dict and id columns mappers updated

This commit is contained in:
2024-11-09 12:47:58 +03:00
parent df5927e5ac
commit e7a9b8c313
15 changed files with 233 additions and 129 deletions

View File

@@ -23,8 +23,10 @@ from api_objects.auth.token_objects import EmployeeTokenObject, OccupantTokenObj
class AddressListEventMethods(MethodToEvent):
event_type = "SELECT"
event_description = "List Address records"
event_category = "Address"
__event_keys__ = {
"9c251d7d-da70-4d63-a72c-e69c26270442": "address_list_super_user", # 1
"9c251d7d-da70-4d63-a72c-e69c26270442": "address_list_super_user",
"52afe375-dd95-4f4b-aaa2-4ec61bc6de52": "address_list_employee",
}
@@ -32,7 +34,7 @@ class AddressListEventMethods(MethodToEvent):
def address_list_super_user(cls, list_options: ListOptions, token_dict):
from sqlalchemy import select
post_code_list = RelationshipEmployee2PostCode.filter_active(
post_code_list = RelationshipEmployee2PostCode.filter_all(
RelationshipEmployee2PostCode.company_id
== token_dict.selected_company.company_id,
).data