Skip to content

Commit a79021d

Browse files
authored
Merge pull request #43 from Sshahar/typo
style: simplify condition
2 parents 9f92bf4 + 7cbea1f commit a79021d

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

  • app/user/application/service

app/user/application/service/user.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,7 @@ async def is_admin(self, *, user_id: int) -> bool:
5050
if not user:
5151
return False
5252

53-
if user.is_admin is False:
54-
return False
55-
56-
return True
53+
return user.is_admin
5754

5855
async def login(self, *, email: str, password: str) -> LoginResponseDTO:
5956
user = await self.repository.get_user_by_email_and_password(

0 commit comments

Comments
 (0)