Serialise microscope ID to string

UUID objects don't serialise with `json.dumps` and thus cause
errors when we try to embed `thing_state` into images.
This commit is contained in:
Richard Bowman 2024-01-11 15:58:42 +00:00
parent f51d6ced71
commit 074b9c67f8

View file

@ -111,7 +111,7 @@ class SettingsManager(Thing):
def thing_state(self) -> Mapping:
state = {
"hostname": gethostname(),
"microscope-uuid": self.microscope_id,
"microscope-uuid": str(self.microscope_id),
}
metadata = self.external_metadata
for k in self.external_metadata_in_state: