updated events initializer
This commit is contained in:
@@ -86,6 +86,7 @@ from Schemas.identity.identity import (
|
||||
OccupantTypes,
|
||||
People,
|
||||
Users,
|
||||
Credentials,
|
||||
RelationshipDutyPeople,
|
||||
Contracts,
|
||||
)
|
||||
@@ -188,6 +189,7 @@ __all__ = [
|
||||
"OccupantTypes",
|
||||
"People",
|
||||
"Users",
|
||||
"Credentials",
|
||||
"RelationshipDutyPeople",
|
||||
"RelationshipEmployee2PostCode",
|
||||
"Contracts",
|
||||
|
||||
@@ -230,8 +230,7 @@ class Event2Employee(CrudCollection):
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def get_event_codes(cls, employee_id: int) -> list:
|
||||
db = cls.new_session()
|
||||
def get_event_codes(cls, employee_id: int, db) -> list:
|
||||
employee_events = cls.filter_all(
|
||||
cls.employee_id == employee_id,
|
||||
db=db,
|
||||
@@ -328,8 +327,7 @@ class Event2Occupant(CrudCollection):
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def get_event_codes(cls, build_living_space_id) -> list:
|
||||
db = cls.new_session()
|
||||
def get_event_codes(cls, build_living_space_id, db) -> list:
|
||||
occupant_events = cls.filter_all(
|
||||
cls.build_living_space_id == build_living_space_id,
|
||||
db=db,
|
||||
|
||||
@@ -18,6 +18,9 @@ class EndpointRestriction(CrudCollection):
|
||||
__tablename__ = "endpoint_restriction"
|
||||
__exclude__fields__ = []
|
||||
|
||||
operation_uu_id: Mapped[UUID] = mapped_column(
|
||||
String, comment="UUID of the operation",
|
||||
)
|
||||
endpoint_function: Mapped[str] = mapped_column(
|
||||
String, server_default="", comment="Function name of the API endpoint"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user