auth endpoints added
This commit is contained in:
@@ -110,9 +110,7 @@ class Services(CrudCollection):
|
||||
def retrieve_service_via_occupant_code(cls, occupant_code):
|
||||
with cls.new_session() as db_session:
|
||||
occupant_type = OccupantTypes.filter_by_one(
|
||||
system=True,
|
||||
occupant_code=occupant_code,
|
||||
db=db_session
|
||||
system=True, occupant_code=occupant_code, db=db_session
|
||||
).data
|
||||
if not occupant_type:
|
||||
cls.raise_http_exception(
|
||||
@@ -124,8 +122,7 @@ class Services(CrudCollection):
|
||||
},
|
||||
)
|
||||
return cls.filter_one(
|
||||
cls.related_responsibility == occupant_type.occupant_code,
|
||||
db=db_session
|
||||
cls.related_responsibility == occupant_type.occupant_code, db=db_session
|
||||
).data
|
||||
|
||||
__table_args__ = ({"comment": "Services Information"},)
|
||||
|
||||
Reference in New Issue
Block a user