events imports are checked
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user