Merge pull request #12477 from szufisher/szufisher-all-repeated-parent-rows

fix: same as previous row treated as one doc
This commit is contained in:
mergify[bot] 2021-03-09 06:48:15 +00:00 committed by GitHub
commit a658304084
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -449,8 +449,8 @@ class ImportFile:
data_without_first_row = data[1:]
for row in data_without_first_row:
row_values = row.get_values(parent_column_indexes)
# if the row is blank, it's a child row doc
if all([v in INVALID_VALUES for v in row_values]):
# if the row is blank or same content as the previous parent row, it's a child row doc
if all([v in INVALID_VALUES for v in row_values]) or row_values == parent_row_values:
rows.append(row)
continue
# if we encounter a row which has values in parent columns,