Merge "Python 3: Enable sm-api to work after unlock"
This commit is contained in:
commit
46a7ccbb6c
@ -35,7 +35,9 @@ JSONPATCH_EXCEPTIONS = (jsonpatch.JsonPatchException,
|
||||
|
||||
|
||||
def validate_limit(limit):
|
||||
if limit and limit < 0:
|
||||
if limit is None:
|
||||
return CONF.api_limit_max
|
||||
elif limit < 0:
|
||||
raise wsme.exc.ClientSideError(_("Limit must be positive"))
|
||||
|
||||
return min(CONF.api_limit_max, limit) or CONF.api_limit_max
|
||||
|
Loading…
Reference in New Issue
Block a user