get erasure datas form abstract device and drop parent details
This commit is contained in:
parent
74a8472aa1
commit
74c8a48d6e
|
@ -1049,10 +1049,14 @@ class Computer(Device):
|
|||
"""Returns the privacy of all ``DataStorage`` components when
|
||||
it is not None.
|
||||
"""
|
||||
components = self.components
|
||||
if self.placeholder and self.placeholder.binding:
|
||||
components = self.placeholder.binding.components
|
||||
|
||||
return set(
|
||||
privacy
|
||||
for privacy in (
|
||||
hdd.privacy for hdd in self.components if isinstance(hdd, DataStorage)
|
||||
hdd.privacy for hdd in components if isinstance(hdd, DataStorage)
|
||||
)
|
||||
if privacy
|
||||
)
|
||||
|
|
|
@ -40,18 +40,6 @@
|
|||
<dt>Data storage:</dt>
|
||||
<dd>{{ erasure.device.__format__('ts') }}</dd>
|
||||
|
||||
<dt>Computer where was erase:</dt>
|
||||
<dd>Title: {{ erasure.parent.__format__('ts') }}</dd>
|
||||
<dd>DevicehubID: {{ erasure.parent.devicehub_id }}</dd>
|
||||
<dd>Hid: {{ erasure.parent.hid }}</dd>
|
||||
<dd>Tags: {{ erasure.parent.tags }}</dd>
|
||||
|
||||
<dt>Computer where it resides:</dt>
|
||||
<dd>Title: {{ erasure.device.parent.__format__('ts') }}</dd>
|
||||
<dd>DevicehubID: {{ erasure.device.parent.devicehub_id }}</dd>
|
||||
<dd>Hid: {{ erasure.device.parent.hid }}</dd>
|
||||
<dd>Tags: {{ erasure.device.parent.tags }}</dd>
|
||||
|
||||
<dt>Erasure:</dt>
|
||||
<dd>{{ erasure.__format__('ts') }}</dd>
|
||||
{% if erasure.steps %}
|
||||
|
|
Reference in a new issue