Skip to content

Commit f10242e

Browse files
mchlwellmanCopilot
andauthored
Update check for negative
Co-authored-by: Copilot <[email protected]>
1 parent bec59b8 commit f10242e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/service/rest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ def get_api_keys(
359359
if min_expiry_days is not None and min_expiry_days <= 0:
360360
error = f"Minimum expiry days '{min_expiry_days}' must be greater than 0"
361361
raise InvalidRequest(error, status_code=400)
362-
if max_expiry_days and max_expiry_days < 0:
362+
if max_expiry_days is not None and max_expiry_days <= 0:
363363
error = f"Maximum expiry days '{max_expiry_days}' must be greater than 0"
364364
raise InvalidRequest(error, status_code=400)
365365

0 commit comments

Comments
 (0)