Fix fetch_* methods modifying their parameters
This commit is contained in:
pare
75ffe55cb7
commit
02d9f5196c
S'han modificat 1 arxius amb 4 adicions i 4 eliminacions
|
@ -758,11 +758,11 @@ class Mastodon:
|
||||||
"""
|
"""
|
||||||
if isinstance(previous_page, list):
|
if isinstance(previous_page, list):
|
||||||
if '_pagination_next' in previous_page[-1]:
|
if '_pagination_next' in previous_page[-1]:
|
||||||
params = previous_page[-1]['_pagination_next']
|
params = copy.deepcopy(previous_page[-1]['_pagination_next'])
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
else:
|
else:
|
||||||
params = previous_page
|
params = copy.deepcopy(previous_page)
|
||||||
|
|
||||||
method = params['_pagination_method']
|
method = params['_pagination_method']
|
||||||
del params['_pagination_method']
|
del params['_pagination_method']
|
||||||
|
@ -782,11 +782,11 @@ class Mastodon:
|
||||||
"""
|
"""
|
||||||
if isinstance(next_page, list):
|
if isinstance(next_page, list):
|
||||||
if '_pagination_prev' in next_page[-1]:
|
if '_pagination_prev' in next_page[-1]:
|
||||||
params = next_page[-1]['_pagination_prev']
|
params = copy.deepcopy(next_page[-1]['_pagination_prev'])
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
else:
|
else:
|
||||||
params = next_page
|
params = copy.deepcopy(next_page)
|
||||||
|
|
||||||
method = params['_pagination_method']
|
method = params['_pagination_method']
|
||||||
del params['_pagination_method']
|
del params['_pagination_method']
|
||||||
|
|
Loading…
Referencia en una nova incidència