init defaults completed

This commit is contained in:
2024-11-10 20:14:13 +03:00
parent aeda315119
commit c42a19c262
37 changed files with 582 additions and 308 deletions

View File

@@ -188,8 +188,8 @@ class ServiceBindEmployeeEventMethods(MethodToEvent):
def bind_services_employee(cls, service_id: int, employee_id: int):
from sqlalchemy.dialects.postgresql import insert
employee = Employees.filter_by_one(id=employee_id, *Employees.valid_record_dict).data
service = Services.filter_by_one(id=service_id, *Services.valid_record_dict).data
employee = Employees.filter_by_one(id=employee_id, **Employees.valid_record_dict).data
service = Services.filter_by_one(id=service_id, **Services.valid_record_dict).data
service_events = Service2Events.filter_all(
Service2Events.service_id == service.id,
*Service2Events.valid_record_args(Service2Events),
@@ -236,7 +236,7 @@ class ServiceBindEmployeeEventMethods(MethodToEvent):
)
employee = Employees.filter_by_one(
uu_id=data.employee_uu_id, *Employees.valid_record_dict
uu_id=data.employee_uu_id, **Employees.valid_record_dict
).data
if not employee:
return JSONResponse(
@@ -249,7 +249,7 @@ class ServiceBindEmployeeEventMethods(MethodToEvent):
)
service = Services.filter_by_one(
uu_id=data.service_uu_id, *Services.valid_record_dict
uu_id=data.service_uu_id, **Services.valid_record_dict
).data
if not service:
return JSONResponse(

View File

@@ -83,7 +83,7 @@ class EventsUpdateEventMethods(MethodToEvent):
@classmethod
def events_update(cls, data: CreateEvents, token_dict):
event = Events.filter_by_one(uu_id=data.uu_id, *Events.valid_record_dict).data
event = Events.filter_by_one(uu_id=data.uu_id, **Events.valid_record_dict).data
if not event:
raise HTTPException(
status_code=404,
@@ -113,7 +113,7 @@ class EventsPatchEventMethods(MethodToEvent):
@classmethod
def events_patch(cls, data: CreateEvents, token_dict):
event = Events.filter_by_one(uu_id=data.uu_id, *Events.valid_record_dict).data
event = Events.filter_by_one(uu_id=data.uu_id, **Events.valid_record_dict).data
if not event:
raise HTTPException(
status_code=404,