diff --git a/src/etools/__init__.py b/src/etools/__init__.py index db22c96a6..fac5f43b5 100644 --- a/src/etools/__init__.py +++ b/src/etools/__init__.py @@ -1,2 +1,2 @@ -VERSION = __version__ = '11.1.6' +VERSION = __version__ = '11.1.7' NAME = 'eTools' diff --git a/src/etools/applications/locations/tasks.py b/src/etools/applications/locations/tasks.py index f47fee2de..518edb30e 100644 --- a/src/etools/applications/locations/tasks.py +++ b/src/etools/applications/locations/tasks.py @@ -60,7 +60,8 @@ def create_or_update_locations(self, batch_size=500): new, updated, skipped, error = 0, 0, 0, 0 logging.info(f'Total Rows {len(rows)}') logging.info(f'Batch size {batch_size}') - for idx, batch in enumerate(zip(*[iter(rows)] * batch_size)): + for idx in range(0, len(rows), batch_size): + batch = rows[idx:idx + batch_size] logging.info(f'processing batch {idx+1}') batch = list(batch) indexed_batch = {item[self.carto.pcode_col]: item for item in batch}