Commit fb66f248 authored by pbair's avatar pbair

Simplify logic to get actual or default limits

Factor out a common method call to more explicitly express how limits
are pulled from an API "scope" vs the default plan
parent 4f20ad1b
......@@ -44,7 +44,7 @@ module API
end
def limit_for_scope(scope)
(scope&.actual_limits || Plan.default.actual_limits).offset_pagination_limit
(scope || Plan.default).actual_limits.offset_pagination_limit
end
def offset_limit_exceeded?(offset_limit)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment