Merge pull request #352 from eReuse/bugfix/2656-certificates

fix exports certificate for placeholders
This commit is contained in:
cayop 2022-09-20 16:41:00 +02:00 committed by GitHub
commit b1736f68af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -901,6 +901,8 @@ class ExportsView(View):
def build_erasure_certificate(self):
erasures = []
for device in self.find_devices():
if device.placeholder and device.placeholder.binding:
device = device.placeholder.binding
if isinstance(device, Computer):
for privacy in device.privacy:
erasures.append(privacy)

View File

@ -63,7 +63,7 @@
<td>
<input type="checkbox" class="deviceSelect" data="{{ ac.device.id }}"
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 %}
checked="checked"
{% endif %}