From 79a2d77976e96e74b36a03c672acd3465fa9b291 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Gr=C3=BCner?= <47506558+MegaRedHand@users.noreply.github.com> Date: Mon, 3 Jun 2024 23:08:49 -0300 Subject: [PATCH] refactor: use isinstance instead of type --- src/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.py b/src/main.py index dac763b..48fd0da 100755 --- a/src/main.py +++ b/src/main.py @@ -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)