Adds deposit field in Computer
This commit is contained in:
parent
4fc6378258
commit
91f5fa4e75
|
@ -378,6 +378,7 @@ class Computer(Device):
|
|||
|
||||
It is a subset of the Linux definition of DMI / DMI decode.
|
||||
"""
|
||||
deposit = Column(Integer, check_range('deposit',min=0,max=100), default=0)
|
||||
|
||||
def __init__(self, chassis, **kwargs) -> None:
|
||||
chassis = ComputerChassis(chassis)
|
||||
|
|
|
@ -141,6 +141,7 @@ class DisplayMixin:
|
|||
class Computer(DisplayMixin, Device):
|
||||
components = ... # type: Column
|
||||
chassis = ... # type: Column
|
||||
deposit = ... # type: Column
|
||||
|
||||
def __init__(self, **kwargs) -> None:
|
||||
super().__init__(**kwargs)
|
||||
|
|
|
@ -121,7 +121,9 @@ class Computer(Device):
|
|||
dump_only=True,
|
||||
collection_class=set,
|
||||
description=m.Computer.privacy.__doc__)
|
||||
|
||||
deposit = Integer(dump_only=True,
|
||||
data_key='deposit',
|
||||
description=m.Computer.deposit.__doc__)
|
||||
|
||||
class Desktop(Computer):
|
||||
__doc__ = m.Desktop.__doc__
|
||||
|
|
Reference in a new issue