refactor(Contact): rename _civilite_map to civilite_map for better accessibility

This commit is contained in:
Fanilo-Nantenaina 2025-12-26 19:18:24 +03:00
parent c101e45afd
commit db3776c000

4
api.py
View file

@ -150,7 +150,7 @@ class Contact(BaseModel):
linkedin: Optional[str] = Field(None, description="Profil LinkedIn (CT_LinkedIn)")
skype: Optional[str] = Field(None, description="Identifiant Skype (CT_Skype)")
_civilite_map = {
civilite_map = {
0: "M.",
1: "Mme",
2: "Mlle",
@ -166,7 +166,7 @@ class Contact(BaseModel):
if v is None:
return v
if isinstance(v, int):
return cls._civilite_map.get(v, str(v)) # retourne le code en string si non mappé
return cls.civilite_map.get(v, str(v)) # retourne le code en string si non mappé
return v
class Config: