From c2c6cf693266ccd013f1b3b2cba90eb3fc7d2e12 Mon Sep 17 00:00:00 2001 From: Walke Mirco Date: Fri, 10 Jul 2020 10:23:58 +0200 Subject: [PATCH] Fixed autofetch all pages when $top is set --- odata/query.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odata/query.py b/odata/query.py index 4d276ad..5d54972 100644 --- a/odata/query.py +++ b/odata/query.py @@ -73,7 +73,7 @@ def __iter__(self): for row in value: yield self._create_model(row) - if '@odata.nextLink' in data: + if '@odata.nextLink' in data and not '$top' in options.keys(): #do not load next page on userpaging url = urljoin(self.entity.__odata_url_base__, data['@odata.nextLink']) options = {} # we get all options in the nextLink url else: