diff --git a/src/openflexure_microscope_server/things/__init__.py b/src/openflexure_microscope_server/things/__init__.py index c497209f..838e649c 100644 --- a/src/openflexure_microscope_server/things/__init__.py +++ b/src/openflexure_microscope_server/things/__init__.py @@ -9,6 +9,10 @@ from typing import Optional, Self import labthings_fastapi as lt +# To ensure consistency, we enable the feature flags we want here. This means +# they will be enabled in any code that imports a `Thing` from this package. +lt.FEATURE_FLAGS.validate_properties_on_set = True + class OFMThing(lt.Thing): """A custom LabThings Thing class for the OpenFlexure Microscope."""