Skip to content

Commit da11ad4

Browse files
committed
exists check fixed to bool instead of is None
1 parent 049a0e7 commit da11ad4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app/api/v1/rate_limits.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,11 @@ async def patch_rate_limit(
9292
raise NotFoundException("Rate Limit not found")
9393

9494
db_rate_limit_path = await crud_rate_limits.exists(db=db, tier_id=db_tier["id"], path=values.path)
95-
if db_rate_limit_path is not None:
95+
if db_rate_limit_path:
9696
raise DuplicateValueException("There is already a rate limit for this path")
9797

9898
await crud_rate_limits.exists(db=db)
99-
if db_rate_limit_path is not None:
99+
if db_rate_limit_path:
100100
raise DuplicateValueException("There is already a rate limit with this name")
101101

102102
await crud_rate_limits.update(db=db, object=values, id=db_rate_limit["id"])

0 commit comments

Comments
 (0)