call one time all lots reset

This commit is contained in:
Cayo Puigdefabregas 2022-07-05 18:18:29 +02:00
parent 3a06ade79f
commit e8b957c697
2 changed files with 3 additions and 4 deletions

View File

@ -179,7 +179,7 @@
{% else %}
<ul id="incoming-lots-nav" class="nav-content collapse" data-bs-parent="#sidebar-nav">
{% endif %}
{% for lot in all_lots %}
{% for lot in lots %}
{% if lot.is_incoming %}
<li>
<a href="{{ url_for('inventory.lotdevicelist', lot_id=lot.id) }}">
@ -204,7 +204,7 @@
{% else %}
<ul id="outgoing-lots-nav" class="nav-content collapse " data-bs-parent="#sidebar-nav">
{% endif %}
{% for lot in all_lots %}
{% for lot in lots %}
{% if lot.is_outgoing %}
<li>
<a href="{{ url_for('inventory.lotdevicelist', lot_id=lot.id) }}">
@ -235,7 +235,7 @@
<i class="bi bi-plus" style="font-size: larger;"></i><span>New temporary lot</span>
</a>
</li>
{% for lot in all_lots %}
{% for lot in lots %}
{% if lot.is_temporary %}
<li>
<a href="{{ url_for('inventory.lotdevicelist', lot_id=lot.id) }}">

View File

@ -69,7 +69,6 @@ class GenericMixin(View):
def get_context(self):
self.context = {
'lots': self.get_lots(),
'all_lots': self.get_lots().all(),
'version': __version__,
}