Merge branch 'master' into bugfix/doc-erasure-fix-hid
This commit is contained in:
commit
c94801deab
|
@ -1262,16 +1262,18 @@ class Computer(Device):
|
||||||
@property
|
@property
|
||||||
def ram_size(self) -> int:
|
def ram_size(self) -> int:
|
||||||
"""The total of RAM memory the computer has."""
|
"""The total of RAM memory the computer has."""
|
||||||
return sum(
|
components = self.components
|
||||||
ram.size or 0 for ram in self.components if isinstance(ram, RamModule)
|
if self.placeholder and self.placeholder.binding:
|
||||||
)
|
components = self.placeholder.binding.components
|
||||||
|
return sum(ram.size or 0 for ram in components if isinstance(ram, RamModule))
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def data_storage_size(self) -> int:
|
def data_storage_size(self) -> int:
|
||||||
"""The total of data storage the computer has."""
|
"""The total of data storage the computer has."""
|
||||||
return sum(
|
components = self.components
|
||||||
ds.size or 0 for ds in self.components if isinstance(ds, DataStorage)
|
if self.placeholder and self.placeholder.binding:
|
||||||
)
|
components = self.placeholder.binding.components
|
||||||
|
return sum(ds.size or 0 for ds in components if isinstance(ds, DataStorage))
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def processor_model(self) -> str:
|
def processor_model(self) -> str:
|
||||||
|
|
|
@ -288,10 +288,10 @@
|
||||||
{% for erasure in erasures %}
|
{% for erasure in erasures %}
|
||||||
<tr style="border-bottom: 1px dashed #000;">
|
<tr style="border-bottom: 1px dashed #000;">
|
||||||
<td>
|
<td>
|
||||||
{{ erasure.device.serial_number.upper() }}
|
{{ erasure.device.serial_number and erasure.device.serial_number.upper() or '' }}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{{ erasure.parent.serial_number.upper() }}
|
{{ erasure.parent.serial_number and erasure.parent.serial_number.upper() or '' }}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{{ erasure.get_public_name() }}
|
{{ erasure.get_public_name() }}
|
||||||
|
|
Reference in New Issue