diff --git a/ereuse_devicehub/config.py b/ereuse_devicehub/config.py index c9c47b1b..32fd1a22 100644 --- a/ereuse_devicehub/config.py +++ b/ereuse_devicehub/config.py @@ -63,7 +63,7 @@ class DevicehubConfig(Config): """The minimum version of ereuse.org workbench that this devicehub accepts. we recommend not changing this value. """ - WORKBENCH_LITE = ["1.0.0"] + SCHEMA_WORKBENCH = ["1.0.0"] TMP_SNAPSHOTS = config('TMP_SNAPSHOTS', '/tmp/snapshots') TMP_LIVES = config('TMP_LIVES', '/tmp/lives') diff --git a/ereuse_devicehub/inventory/forms.py b/ereuse_devicehub/inventory/forms.py index d1c1b13e..990608c6 100644 --- a/ereuse_devicehub/inventory/forms.py +++ b/ereuse_devicehub/inventory/forms.py @@ -275,7 +275,7 @@ class UploadSnapshotForm(SnapshotMixin, FlaskForm): def is_wb_lite_snapshot(self, version: str) -> bool: is_lite = False - if version in app.config['WORKBENCH_LITE']: + if version in app.config['SCHEMA_WORKBENCH']: is_lite = True return is_lite diff --git a/ereuse_devicehub/parser/schemas.py b/ereuse_devicehub/parser/schemas.py index 50fc698f..1a84b8bc 100644 --- a/ereuse_devicehub/parser/schemas.py +++ b/ereuse_devicehub/parser/schemas.py @@ -26,11 +26,11 @@ class Snapshot_lite(Thing): @validates_schema def validate_workbench_version(self, data: dict): - if data['schema_api'] not in app.config['WORKBENCH_LITE']: + if data['schema_api'] not in app.config['SCHEMA_WORKBENCH']: raise ValidationError( 'Min. supported Workbench version is ' '{} but yours is {}.'.format( - app.config['WORKBENCH_LITE'][0], data['version'] + app.config['SCHEMA_WORKBENCH'][0], data['version'] ), field_names=['version'], )