change required for display, functionality and apparence
This commit is contained in:
parent
36cd61c0bd
commit
b8812f0b82
|
@ -28,6 +28,9 @@ def get_inv():
|
|||
|
||||
def upgrade():
|
||||
op.alter_column('computer', 'chassis', nullable=True, schema=f'{get_inv()}')
|
||||
op.alter_column('display', 'size', nullable=True, schema=f'{get_inv()}')
|
||||
op.alter_column('display', 'resolution_width', nullable=True, schema=f'{get_inv()}')
|
||||
op.alter_column('display', 'resolution_height', nullable=True, schema=f'{get_inv()}')
|
||||
# pass
|
||||
|
||||
|
||||
|
|
|
@ -260,9 +260,8 @@ class TestBios(Test):
|
|||
|
||||
class VisualTest(Test):
|
||||
__doc__ = m.VisualTest.__doc__
|
||||
appearance_range = EnumField(AppearanceRange, required=True, data_key='appearanceRange')
|
||||
appearance_range = EnumField(AppearanceRange, data_key='appearanceRange')
|
||||
functionality_range = EnumField(FunctionalityRange,
|
||||
required=True,
|
||||
data_key='functionalityRange')
|
||||
labelling = Boolean()
|
||||
|
||||
|
|
|
@ -342,19 +342,19 @@ class Device(Thing):
|
|||
|
||||
class DisplayMixin:
|
||||
"""Base class for the Display Component and the Monitor Device."""
|
||||
size = Column(Float(decimal_return_scale=1), check_range('size', 2, 150), nullable=False)
|
||||
size = Column(Float(decimal_return_scale=1), check_range('size', 2, 150), nullable=True)
|
||||
size.comment = """The size of the monitor in inches."""
|
||||
technology = Column(DBEnum(DisplayTech))
|
||||
technology.comment = """The technology the monitor uses to display
|
||||
the image.
|
||||
"""
|
||||
resolution_width = Column(SmallInteger, check_range('resolution_width', 10, 20000),
|
||||
nullable=False)
|
||||
nullable=True)
|
||||
resolution_width.comment = """The maximum horizontal resolution the
|
||||
monitor can natively support in pixels.
|
||||
"""
|
||||
resolution_height = Column(SmallInteger, check_range('resolution_height', 10, 20000),
|
||||
nullable=False)
|
||||
nullable=True)
|
||||
resolution_height.comment = """The maximum vertical resolution the
|
||||
monitor can natively support in pixels.
|
||||
"""
|
||||
|
|
Reference in New Issue