Make paginate_by adaptable
This commit is contained in:
parent
99e6e9392a
commit
169a6c44a6
1 changed files with 2 additions and 2 deletions
|
@ -129,12 +129,12 @@ class Adonis:
|
|||
|
||||
return result
|
||||
|
||||
def getRequirements(self, view):
|
||||
def getRequirements(self, view, paginate_by=100):
|
||||
requirements = []
|
||||
pnum = 1
|
||||
|
||||
while True:
|
||||
page = self.getCrewListView(view, pagination="True", paginate_by="100", page=str(pnum))
|
||||
page = self.getCrewListView(view, pagination="True", paginate_by=str(paginate_by), page=str(pnum))
|
||||
|
||||
for record in json.loads(page["Result"]):
|
||||
requirements.append((record["PIN"], record["Document code"]))
|
||||
|
|
Loading…
Reference in a new issue