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
|
return result
|
||||||
|
|
||||||
def getRequirements(self, view):
|
def getRequirements(self, view, paginate_by=100):
|
||||||
requirements = []
|
requirements = []
|
||||||
pnum = 1
|
pnum = 1
|
||||||
|
|
||||||
while True:
|
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"]):
|
for record in json.loads(page["Result"]):
|
||||||
requirements.append((record["PIN"], record["Document code"]))
|
requirements.append((record["PIN"], record["Document code"]))
|
||||||
|
|
Loading…
Reference in a new issue