From 85852823e560fd83cbd2325e7bab16cde0ccac82 Mon Sep 17 00:00:00 2001 From: Geert Hesselink Date: Fri, 28 Jul 2023 19:31:04 +0200 Subject: [PATCH] update depreciated pydantic config --- features/rule_creation_protocol/config.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/features/rule_creation_protocol/config.py b/features/rule_creation_protocol/config.py index ad2daf2e..51c15e4b 100644 --- a/features/rule_creation_protocol/config.py +++ b/features/rule_creation_protocol/config.py @@ -1,9 +1,8 @@ -from pydantic import BaseModel +from pydantic import BaseModel, ConfigDict class ConfiguredBaseModel(BaseModel): """Base Pydantic model with assignment validation enabled. Serves as a base class for Pydantic models, enabling validation when instance values are changed. """ - class Config: - validate_assignment = True \ No newline at end of file + model_config = ConfigDict(validate_assignment=True) \ No newline at end of file