Enable the export of several relation field types

This commit is contained in:
Jeff Bradberry
2020-03-23 16:42:34 -04:00
parent 3860c7597f
commit e0f6af4700
2 changed files with 24 additions and 5 deletions

View File

@@ -273,7 +273,7 @@ class Page(object):
def get(self, all_pages=False, **query_parameters):
r = self.connection.get(self.endpoint, query_parameters)
page = self.page_identity(r)
if all_pages and page.next:
if all_pages and getattr(page, 'next', None):
paged_results = [r.json()['results']]
while page.next:
r = self.connection.get(self.next, query_parameters)