bank updated
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import typing
|
||||
from typing import Union
|
||||
|
||||
from fastapi import status, HTTPException
|
||||
from fastapi.responses import JSONResponse
|
||||
@@ -28,6 +29,7 @@ from api_objects.auth.token_objects import EmployeeTokenObject, OccupantTokenObj
|
||||
class BuildListEventMethods(MethodToEvent):
|
||||
|
||||
event_type = "SELECT"
|
||||
|
||||
__event_keys__ = {
|
||||
"68b3b5ed-b74c-4a27-820f-3959214e94e9": "build_list",
|
||||
}
|
||||
@@ -78,7 +80,6 @@ class BuildCreateEventMethods(MethodToEvent):
|
||||
)
|
||||
|
||||
created_build = Build.create_action(data=data, token=token_dict)
|
||||
|
||||
build_type = BuildTypes.filter_by_one(
|
||||
**BuildTypes.valid_record_dict, type_code="APT_YNT"
|
||||
).data
|
||||
@@ -178,7 +179,12 @@ class BuildUpdateEventMethods(MethodToEvent):
|
||||
}
|
||||
|
||||
@classmethod
|
||||
def build_update(cls, build_uu_id: str, data: UpdateBuild, token_dict):
|
||||
def build_update(
|
||||
cls,
|
||||
build_uu_id: str,
|
||||
data: UpdateBuild,
|
||||
token_dict: Union[EmployeeTokenObject, OccupantTokenObject]
|
||||
):
|
||||
Build.pre_query = Build.select_action(
|
||||
employee_id=token_dict.selected_company.employee_id
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user