events imports are checked

This commit is contained in:
2024-11-08 15:05:12 +03:00
parent 643d6d8f65
commit a5b1e0b2f4
71 changed files with 2517 additions and 312 deletions

View File

@@ -9,7 +9,7 @@ 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 import (
from api_validations.validations_request import (
InsertBuildParts,
ListOptions,
)
@@ -58,6 +58,7 @@ class BuildingBuildPartsCreateEventMethods(MethodToEvent):
},
status_code=status.HTTP_406_NOT_ACCEPTABLE,
)
created_build.save()
return JSONResponse(
content={
"completed": True,
@@ -78,6 +79,7 @@ class BuildingBuildPartsUpdateEventMethods(MethodToEvent):
@classmethod
def building_build_parts_update(cls, data: InsertBuildParts, token_dict: dict):
if updated_build := BuildParts.update_action(data=data, token=token_dict):
updated_build.save()
return JSONResponse(
content={
"completed": True,