fix exports certificate for placeholders
This commit is contained in:
parent
4d3ab6a70c
commit
6d8365564e
|
@ -901,6 +901,8 @@ class ExportsView(View):
|
||||||
def build_erasure_certificate(self):
|
def build_erasure_certificate(self):
|
||||||
erasures = []
|
erasures = []
|
||||||
for device in self.find_devices():
|
for device in self.find_devices():
|
||||||
|
if device.placeholder and device.placeholder.binding:
|
||||||
|
device = device.placeholder.binding
|
||||||
if isinstance(device, Computer):
|
if isinstance(device, Computer):
|
||||||
for privacy in device.privacy:
|
for privacy in device.privacy:
|
||||||
erasures.append(privacy)
|
erasures.append(privacy)
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
<td>
|
<td>
|
||||||
<input type="checkbox" class="deviceSelect" data="{{ ac.device.id }}"
|
<input type="checkbox" class="deviceSelect" data="{{ ac.device.id }}"
|
||||||
data-device-type="{{ ac.device.type }}" data-device-manufacturer="{{ ac.device.manufacturer }}"
|
data-device-type="{{ ac.device.type }}" data-device-manufacturer="{{ ac.device.manufacturer }}"
|
||||||
data-device-dhid="{{ ac.device.devicehub_id }}" data-device-vname="{{ ac.device.verbose_name }}"
|
data-device-dhid="{{ ac.device.dhid }}" data-device-vname="{{ ac.device.verbose_name }}"
|
||||||
{% if form_new_allocate.type.data and ac.device.id in list_devices %}
|
{% if form_new_allocate.type.data and ac.device.id in list_devices %}
|
||||||
checked="checked"
|
checked="checked"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Reference in New Issue