diff --git a/ereuse_devicehub/migrations/versions/378b6b147b46_nullable.py b/ereuse_devicehub/migrations/versions/378b6b147b46_nullable.py index 670749f7..4bc48443 100644 --- a/ereuse_devicehub/migrations/versions/378b6b147b46_nullable.py +++ b/ereuse_devicehub/migrations/versions/378b6b147b46_nullable.py @@ -31,6 +31,9 @@ def upgrade(): 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()}') + op.alter_column('monitor', 'size', nullable=True, schema=f'{get_inv()}') + op.alter_column('monitor', 'resolution_width', nullable=True, schema=f'{get_inv()}') + op.alter_column('monitor', 'resolution_height', nullable=True, schema=f'{get_inv()}') # pass diff --git a/ereuse_devicehub/resources/device/schemas.py b/ereuse_devicehub/resources/device/schemas.py index c05199f0..ea5b3211 100644 --- a/ereuse_devicehub/resources/device/schemas.py +++ b/ereuse_devicehub/resources/device/schemas.py @@ -148,17 +148,17 @@ class Server(Computer): class DisplayMixin: __doc__ = m.DisplayMixin.__doc__ - size = Float(description=m.DisplayMixin.size.comment, validate=Range(2, 150), required=True) + size = Float(description=m.DisplayMixin.size.comment, validate=Range(2, 150)) technology = EnumField(enums.DisplayTech, description=m.DisplayMixin.technology.comment) resolution_width = Integer(data_key='resolutionWidth', validate=Range(10, 20000), description=m.DisplayMixin.resolution_width.comment, - required=True) + ) resolution_height = Integer(data_key='resolutionHeight', validate=Range(10, 20000), description=m.DisplayMixin.resolution_height.comment, - required=True) + ) refresh_rate = Integer(data_key='refreshRate', validate=Range(10, 1000)) contrast_ratio = Integer(data_key='contrastRatio', validate=Range(100, 100000)) touchable = Boolean(description=m.DisplayMixin.touchable.comment)