add lots in list of erasures actions
This commit is contained in:
parent
6d722bb19f
commit
20ccb385d8
|
@ -676,6 +676,12 @@ class Device(Thing):
|
|||
return args
|
||||
|
||||
def get_lots_for_template(self):
|
||||
if self.binding:
|
||||
return self.binding.device.get_lots_for_template()
|
||||
|
||||
if not self.lots and hasattr(self, 'parent') and self.parent:
|
||||
return self.parent.get_lots_for_template()
|
||||
|
||||
lots = []
|
||||
for lot in self.lots:
|
||||
if lot.is_incoming:
|
||||
|
|
|
@ -187,9 +187,9 @@
|
|||
{% endif %}
|
||||
{{ ac.device.serial_number.upper() }}
|
||||
{% endif %}
|
||||
{% if ac.device.my_partner.lots | length > 0 %}
|
||||
{% if ac.device.get_lots_for_template() | length > 0 %}
|
||||
<h6 class="d-inline">
|
||||
{% for lot in ac.device.my_partner.get_lots_for_template() %}
|
||||
{% for lot in ac.device.get_lots_for_template() %}
|
||||
<span class="badge rounded-pill bg-light text-dark">{{ lot }}</span>
|
||||
{% endfor %}
|
||||
</h6>
|
||||
|
|
Reference in New Issue