updated handler exceptions
This commit is contained in:
@@ -122,6 +122,9 @@ class Users(CrudCollection, UserLoginModule, SelectAction):
|
||||
person_uu_id: Mapped[str] = mapped_column(
|
||||
String, server_default="", comment="Person UUID", index=True
|
||||
)
|
||||
local_timezone = mapped_column(
|
||||
String, server_default="GMT+3", comment="Local timezone of user"
|
||||
)
|
||||
person = relationship("People", back_populates="user", foreign_keys=[person_id])
|
||||
|
||||
@property
|
||||
@@ -183,11 +186,6 @@ class Users(CrudCollection, UserLoginModule, SelectAction):
|
||||
@classmethod
|
||||
def credentials(cls):
|
||||
person_object = People.filter_by_one(system=True, id=cls.person_id).data
|
||||
# if not person_object:
|
||||
# raise HTTPException(
|
||||
# status_code=401,
|
||||
# detail="Person not found. Please contact the admin.",
|
||||
# )
|
||||
if person_object:
|
||||
return {
|
||||
"person_id": person_object.id,
|
||||
|
||||
Reference in New Issue
Block a user