fix disks without placeholder
This commit is contained in:
parent
95ac4e794b
commit
9d7869929c
|
@ -166,10 +166,14 @@ class DeviceDetailView(GenericMixin):
|
|||
)
|
||||
|
||||
form_tags = TagDeviceForm(dhid=id)
|
||||
placeholder = device.binding or device.placeholder
|
||||
if not placeholder:
|
||||
return NotFound()
|
||||
|
||||
self.context.update(
|
||||
{
|
||||
'device': device,
|
||||
'placeholder': device.binding or device.placeholder,
|
||||
'placeholder': placeholder,
|
||||
'page_title': 'Device {}'.format(device.devicehub_id),
|
||||
'form_tag_device': form_tags,
|
||||
}
|
||||
|
|
|
@ -71,9 +71,13 @@
|
|||
/>
|
||||
</td>
|
||||
<td>
|
||||
{% if ac.device.phid() %}
|
||||
<a href="{{ url_for('inventory.device_details', id=ac.device.dhid)}}">
|
||||
{{ ac.device.serial_number.upper() }}
|
||||
</a>
|
||||
{% else %}
|
||||
{{ ac.device.serial_number.upper() }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ url_for('inventory.export', export_id='snapshot') }}?id={{ ac.snapshot.uuid }}">
|
||||
|
|
Reference in New Issue