Skip to content

Commit

Permalink
Fix critical bug with batch_update not using chunked records
Browse files Browse the repository at this point in the history
  • Loading branch information
skylander86 committed Aug 10, 2020
1 parent d4a8a54 commit 5852793
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion airtable/__version__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.2"
__version__ = "0.3"
__name__ = "python-airtable"
__description__ = "Python module for accessing Airtable (largely based on the original airtable-python-wrapper)."
__url__ = "https://github.com/fivehealth/python-airtable"
Expand Down
2 changes: 1 addition & 1 deletion airtable/airtable_new.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def batch_update(self, records, typecast=True, destructive=False):
request_func = self._put if destructive else self._patch

for chunk in self._chunk(records, self.MAX_RECORDS_PER_REQUEST):
new_records = [{'id': record_id, 'fields': fields} for record_id, fields in records]
new_records = [{'id': record_id, 'fields': fields} for record_id, fields in chunk]

response = request_func(self.url_table, json_data={'records': new_records, 'typecast': typecast})

Expand Down

0 comments on commit 5852793

Please sign in to comment.