Skip to content

Commit e73f411

Browse files
committed
Prod: add vacancy city metadata
1 parent 1aee63c commit e73f411

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎vacancy/constants.py‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33

44
class ChoicesMixin:
5-
65
@classmethod
76
def choices(cls):
87
"""Return a list of tuples (value, display_name) for choices."""
@@ -51,3 +50,10 @@ class WorkFormat(ChoicesMixin, Enum):
5150
REMOTE: str = "удаленная работа"
5251
OFFICE: str = "работа в офисе"
5352
HYBRID: str = "смешанный формат"
53+
54+
@classmethod
55+
def from_display(cls, display_value):
56+
"""Нормализует legacy-значение Angular в канонический смешанный формат."""
57+
if display_value == "смешанная":
58+
display_value = cls.HYBRID.value
59+
return super().from_display(display_value)

0 commit comments

Comments
 (0)