Skip to content

Commit

Permalink
refactor: use isinstance instead of type
Browse files Browse the repository at this point in the history
  • Loading branch information
MegaRedHand committed Jun 4, 2024
1 parent cd1c59a commit 79a2d77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def add_user_to_group(
group_id: int,
req: schemas.AddUserToGroupRequest,
):
if type(req.user_identifier) == str:
if isinstance(req.user_identifier, str):
user_to_add = crud.get_user_by_email(db, req.user_identifier)
else:
user_to_add = crud.get_user_by_id(db, req.user_identifier)
Expand Down

0 comments on commit 79a2d77

Please sign in to comment.