Specify the feature branch of LabThings and enable the feature flag.
I've put the feature flag in `openflexure_microscope_server.things.__init__` so that we only need it once, rather than next to every Thing definition. I decided it was better here than, for example, in the server or cli modules because this way we still get the feature flags even if the Things are served from a different LabThings server.
This commit is contained in:
parent
d673ceab7b
commit
05f92b9b33
1 changed files with 4 additions and 0 deletions
|
|
@ -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."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue