mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 20:16:44 +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:
|
if self.data is None:
|
||||||
return 0
|
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):
|
def get_row(self, index):
|
||||||
""" Retrieve a dict object representing the data row at a particular offset """
|
""" 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>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 %}
|
{% endblock %}
|
Loading…
x
Reference in New Issue
Block a user