updated handler exceptions

This commit is contained in:
2025-01-11 19:40:10 +03:00
parent cecf1e69a2
commit 56b693989d
34 changed files with 571 additions and 1126 deletions

View File

@@ -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,