Skip to content

Commit

Permalink
Merge pull request #153 from dimagi/cz/fix-repeat-failure
Browse files Browse the repository at this point in the history
don't modify params in place
  • Loading branch information
czue committed Jun 26, 2020
2 parents 9aa8fcc + fbd43de commit 6e75d5b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion commcare_export/commcare_hq_client.py
@@ -1,5 +1,6 @@
from __future__ import unicode_literals, print_function, absolute_import, division, generators, nested_scopes

import copy
import logging
from collections import OrderedDict

Expand Down Expand Up @@ -138,7 +139,7 @@ def iterate_resource(resource=resource, params=params):
raise ResourceRepeatException("Requested resource '{}' {} times with same parameters".format(resource, repeat_counter))

batch = self.get(resource, params)
last_params = params
last_params = copy.copy(params)
if not total_count or total_count == 'unknown' or fetched >= total_count:
total_count = int(batch['meta']['total_count']) if batch['meta']['total_count'] else 'unknown'
fetched = 0
Expand Down

0 comments on commit 6e75d5b

Please sign in to comment.