Skip to content

Commit

Permalink
Merge pull request #1364 from burnash/1363-get_all_records-retrieves-…
Browse files Browse the repository at this point in the history
…a-large-number-of-empty-rows-after-the-end-of-the-data

1363 get all records retrieves a large number of empty rows after the end of the data
  • Loading branch information
alifeee authored Dec 7, 2023
2 parents e532206 + ed3d428 commit 495a329
Show file tree
Hide file tree
Showing 3 changed files with 4,109 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gspread/worksheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,8 @@ def get_records( # noqa: C901 # this comment disables the complexity check for
values = fill_gaps(values, cols=keys_width, padding_value=default_blank)

# pad values to be the HEIGHT of last_index - first_index + 1
values = fill_gaps(values, rows=last_index - first_index + 1)
if last_index_set is True:
values = fill_gaps(values, rows=last_index - first_index + 1)

if expected_headers is None:
# all headers must be unique
Expand Down
Loading

0 comments on commit 495a329

Please sign in to comment.