Skip to content

Commit

Permalink
pattern_import_export: no data is success
Browse files Browse the repository at this point in the history
  • Loading branch information
hparfr committed Apr 14, 2023
1 parent b1d9209 commit c2d3e2f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pattern_import_export/models/pattern_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,11 @@ def split_in_chunk(self):
previous_idx = idx
if items:
self._create_chunk(start_idx, idx, items)
else:
# document has an header and no data lines
# valid document. So create a dummy chunk
# to have progression and status
self._create_chunk(-1, -1, [])
except Exception as e:
self.state = "failed"
self.info = _("Failed to create the chunk: %s") % e
Expand Down
1 change: 1 addition & 0 deletions pattern_import_export/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
* Sébastien Beau <[email protected]>
* François Honoré (ACSONE SA/NV) <[email protected]>
* Kevin Khao <[email protected]>
* Raphaël Reverdy <[email protected]>

0 comments on commit c2d3e2f

Please sign in to comment.