Adds deposit field in Computer

This commit is contained in:
emmdim 2019-12-11 00:35:17 +01:00
parent 14d5379edb
commit bdd996a132
3 changed files with 6 additions and 2 deletions

View File

@ -379,6 +379,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)

View File

@ -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)

View File

@ -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__