diff --git a/server/requests_to_models/request_executor.py b/server/requests_to_models/request_executor.py index ca89f4c..10f0bc9 100644 --- a/server/requests_to_models/request_executor.py +++ b/server/requests_to_models/request_executor.py @@ -50,7 +50,14 @@ def _fetch(self, request: FetchRequest): data.append(obj) result['data'] = data - result['has_more'] = request.offset + request.limit < result['count'] + + if not data: + result['has_more'] = False + else: + if request.limit > 0: + result['has_more'] = request.offset + request.limit < result['count'] + else: + result['has_more'] = False return result