From c07aeb1b31d6c93cd71583d1165982ce44416760 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9mence=20Lesn=C3=A9?= Date: Thu, 12 Dec 2024 17:50:56 +0100 Subject: [PATCH] perf: Don't store lang field As it is dynamically computed. It serve no purpose. --- app/models/call.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/models/call.py b/app/models/call.py index 1e8a7c9..6d02e07 100644 --- a/app/models/call.py +++ b/app/models/call.py @@ -5,7 +5,7 @@ from typing import Any from uuid import UUID, uuid4 -from pydantic import BaseModel, Field, ValidationInfo, computed_field, field_validator +from pydantic import BaseModel, Field, ValidationInfo, field_validator from app.helpers.config_models.conversation import ( LanguageEntryModel, @@ -107,7 +107,6 @@ class CallStateModel(CallGetModel, extra="ignore"): recognition_retry: int = 0 voice_id: str | None = None - @computed_field @property def lang(self) -> LanguageEntryModel: # pyright: ignore default = self.initiate.lang.default_lang