validation requester updated
This commit is contained in:
@@ -43,6 +43,7 @@ class MethodToEvent(ABC, ActionsSchemaFactory):
|
||||
event_category: str = ""
|
||||
|
||||
__event_keys__: dict = {}
|
||||
__event_validation__: dict = {}
|
||||
|
||||
@classmethod
|
||||
def call_event_method(cls, method_uu_id: str, *args, **kwargs):
|
||||
|
||||
@@ -29,6 +29,10 @@ class AccountRecordsListEventMethods(MethodToEvent):
|
||||
"7192c2aa-5352-4e36-98b3-dafb7d036a3d": "account_records_list",
|
||||
"208e6273-17ef-44f0-814a-8098f816b63a": "account_records_list_flt_res",
|
||||
}
|
||||
__event_validation__ = {
|
||||
"7192c2aa-5352-4e36-98b3-dafb7d036a3d": ListOptions,
|
||||
"208e6273-17ef-44f0-814a-8098f816b63a": ListOptions,
|
||||
}
|
||||
|
||||
@classmethod
|
||||
def account_records_list(
|
||||
@@ -189,6 +193,9 @@ class AccountRecordsCreateEventMethods(MethodToEvent):
|
||||
__event_keys__ = {
|
||||
"31f4f32f-0cd4-4995-8a6a-f9f56335848a": "account_records_create",
|
||||
}
|
||||
__event_validation__ = {
|
||||
"31f4f32f-0cd4-4995-8a6a-f9f56335848a": InsertAccountRecord,
|
||||
}
|
||||
|
||||
@classmethod
|
||||
def account_records_create(
|
||||
@@ -275,6 +282,9 @@ class AccountRecordsUpdateEventMethods(MethodToEvent):
|
||||
__event_keys__ = {
|
||||
"ec98ef2c-bcd0-432d-a8f4-1822a56c33b2": "account_records_update",
|
||||
}
|
||||
__event_validation__ = {
|
||||
"ec98ef2c-bcd0-432d-a8f4-1822a56c33b2": UpdateAccountRecord,
|
||||
}
|
||||
|
||||
@classmethod
|
||||
def build_area_update(
|
||||
@@ -304,6 +314,9 @@ class AccountRecordsPatchEventMethods(MethodToEvent):
|
||||
__event_keys__ = {
|
||||
"34c38937-42a2-45f1-b2ef-a23978650aee": "account_records_patch",
|
||||
}
|
||||
__event_validation__ = {
|
||||
"34c38937-42a2-45f1-b2ef-a23978650aee": None,
|
||||
}
|
||||
|
||||
@classmethod
|
||||
def build_area_patch(
|
||||
|
||||
@@ -284,13 +284,9 @@ class BuildingLivingSpacesUpdateEventMethods(MethodToEvent):
|
||||
BuildingLivingSpacesListEventMethod = BuildingLivingSpacesListEventMethods(
|
||||
action=ActionsSchema(endpoint="/building/living_space/list")
|
||||
)
|
||||
BuildingLivingSpacesCreateEventMethod = (
|
||||
BuildingLivingSpacesCreateEventMethods(
|
||||
action=ActionsSchema(endpoint="/building/living_space/create")
|
||||
)
|
||||
BuildingLivingSpacesCreateEventMethod = BuildingLivingSpacesCreateEventMethods(
|
||||
action=ActionsSchema(endpoint="/building/living_space/create")
|
||||
)
|
||||
BuildingLivingSpacesUpdateEventMethod = (
|
||||
BuildingLivingSpacesUpdateEventMethods(
|
||||
action=ActionsSchema(endpoint="/building/living_space/update")
|
||||
)
|
||||
BuildingLivingSpacesUpdateEventMethod = BuildingLivingSpacesUpdateEventMethods(
|
||||
action=ActionsSchema(endpoint="/building/living_space/update")
|
||||
)
|
||||
|
||||
@@ -32,11 +32,10 @@ class ModulesBindOccupantEventMethods(MethodToEvent):
|
||||
):
|
||||
|
||||
living_space = BuildLivingSpace.filter_one(
|
||||
BuildLivingSpace.id == build_living_space_id,
|
||||
system=True
|
||||
BuildLivingSpace.id == build_living_space_id, system=True
|
||||
).data
|
||||
modules = Modules.filter_all(Modules.is_default_module == True).data
|
||||
print('living_space', living_space, 'modules', modules)
|
||||
print("living_space", living_space, "modules", modules)
|
||||
if not living_space or not modules:
|
||||
print(f"Giving living Space or Modules: Default not found")
|
||||
return
|
||||
@@ -113,7 +112,7 @@ class ModulesBindEmployeeEventMethods(MethodToEvent):
|
||||
Employees.id == employee_id,
|
||||
).data
|
||||
modules = Modules.filter_all(Modules.is_default_module == True).data
|
||||
print('living_space', employee, 'modules', modules)
|
||||
print("living_space", employee, "modules", modules)
|
||||
if not employee or not modules:
|
||||
print(f"Giving living Space or Modules: Default not found")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user