Update BaseModels to use ConfigDict rather than directly use a dictionary
This commit is contained in:
parent
a0f7441a42
commit
7f7809de9d
1 changed files with 2 additions and 2 deletions
|
|
@ -9,7 +9,7 @@ import threading
|
|||
import json
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
from pydantic import BaseModel, field_validator, field_serializer
|
||||
from pydantic import BaseModel, field_validator, field_serializer, ConfigDict
|
||||
|
||||
from openflexure_microscope_server.utilities import requires_lock
|
||||
from openflexure_microscope_server.utilities import make_name_safe
|
||||
|
|
@ -49,7 +49,7 @@ class ScanData(BaseModel):
|
|||
Properties that are not known until the end have ``None`` serialised as "Unknown"
|
||||
"""
|
||||
|
||||
model_config = {"extra": "forbid"}
|
||||
model_config = ConfigDict(extra="forbid")
|
||||
|
||||
scan_name: str
|
||||
"""The name of the scan i.e. scan_0001"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue