File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -46,13 +46,12 @@ def fetch_pretalx_data(
46
46
# Pretalx paginates the output, so we will need to do multiple requests and
47
47
# then merge multiple pages to one big dictionary
48
48
results = []
49
- data = {"next" : url }
50
49
page = 0
51
50
52
- # This takes advantage of the fact that "next" will contain a url to the
51
+ # This takes advantage of the fact that url will contain a url to the
53
52
# next page, until there is more data to fetch. If this is the last page,
54
- # then the data["next"] will be None (falsy), and thus stop the while loop.
55
- while url := data [ "next" ] :
53
+ # then the url will be None (falsy), and thus stop the while loop.
54
+ while url :
56
55
page += 1
57
56
response = httpx .get (url , headers = headers )
58
57
@@ -64,6 +63,7 @@ def fetch_pretalx_data(
64
63
65
64
data = response .json ()
66
65
results += data ["results" ]
66
+ url = data ["next" ]
67
67
68
68
return results
69
69
You can’t perform that action at this time.
0 commit comments