We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 049a0e7 commit da11ad4Copy full SHA for da11ad4
src/app/api/v1/rate_limits.py
@@ -92,11 +92,11 @@ async def patch_rate_limit(
92
raise NotFoundException("Rate Limit not found")
93
94
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:
+ if db_rate_limit_path:
96
raise DuplicateValueException("There is already a rate limit for this path")
97
98
await crud_rate_limits.exists(db=db)
99
100
raise DuplicateValueException("There is already a rate limit with this name")
101
102
await crud_rate_limits.update(db=db, object=values, id=db_rate_limit["id"])
0 commit comments