Skip to content

Commit

Permalink
Fixed bug with admin post endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
jontyms committed Aug 1, 2024
1 parent 9c1ede0 commit 965e8df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def nid_regex(cls, email):
# What admins can edit.
class UserModelMutable(BaseModel):
# Identifiers
id: Optional[str] = None
id: Optional[uuid.UUID] = None
discord_id: Optional[str] = None
ucf_id: Optional[int] = None
nid: Optional[str] = None
Expand Down
2 changes: 1 addition & 1 deletion app/routes/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ async def admin_edit(

statement = (
select(UserModel)
.where(UserModel.id == uuid.UUID(member_id))
.where(UserModel.id == member_id)
.options(selectinload(UserModel.discord), selectinload(UserModel.ethics_form))
)
member_data = session.exec(statement).one_or_none()
Expand Down

0 comments on commit 965e8df

Please sign in to comment.