diff --git a/ereuse_devicehub/migrations/versions/378b6b147b46_nullable.py b/ereuse_devicehub/migrations/versions/378b6b147b46_nullable.py index 1a8e06c9..670749f7 100644 --- a/ereuse_devicehub/migrations/versions/378b6b147b46_nullable.py +++ b/ereuse_devicehub/migrations/versions/378b6b147b46_nullable.py @@ -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 diff --git a/ereuse_devicehub/resources/action/schemas.py b/ereuse_devicehub/resources/action/schemas.py index 4d07d405..b29aa06a 100644 --- a/ereuse_devicehub/resources/action/schemas.py +++ b/ereuse_devicehub/resources/action/schemas.py @@ -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() diff --git a/ereuse_devicehub/resources/device/models.py b/ereuse_devicehub/resources/device/models.py index fd75858b..f929ff1f 100644 --- a/ereuse_devicehub/resources/device/models.py +++ b/ereuse_devicehub/resources/device/models.py @@ -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. """