Skip to content

Commit

Permalink
perf: Don't store lang field
Browse files Browse the repository at this point in the history
As it is dynamically computed. It serve no purpose.
  • Loading branch information
clemlesne committed Dec 12, 2024
1 parent ce7581b commit c07aeb1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/models/call.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c07aeb1

Please sign in to comment.