mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Limit the number of lines returned in row_count
This commit is contained in:
parent
c4944268f3
commit
6af51c5b35
@ -162,7 +162,10 @@ class BomUploadManager:
|
||||
if self.data is None:
|
||||
return 0
|
||||
|
||||
return len(self.data) - self.starting_row
|
||||
# Limit the number of BOM lines to be sensible
|
||||
count = min(len(self.data) - self.starting_row, 1000)
|
||||
|
||||
return count
|
||||
|
||||
def get_row(self, index):
|
||||
""" Retrieve a dict object representing the data row at a particular offset """
|
||||
|
@ -8,6 +8,10 @@
|
||||
|
||||
<p>The BOM file must contain the required named columns as provided in the <a href="/part/bom_template/">BOM Upload Template</a></a></p>
|
||||
|
||||
<p>Supported file formats: <i>.csv, .tsv, .xls, .xlsx</i></p>
|
||||
<b>Notes:</b>
|
||||
<ul>
|
||||
<li>Supported file formats: <i>.csv, .tsv, .xls, .xlsx</li>
|
||||
<li>Maximum of 1000 lines per BOM</li>
|
||||
</ul>
|
||||
|
||||
{% endblock %}
|
Loading…
Reference in New Issue
Block a user