fixed location empty on goozali

pull/231/head
Yariv Menachem 2024-12-31 16:11:13 +02:00
parent 5befc16ea8
commit 0bb64a1fc3
1 changed files with 7 additions and 4 deletions

View File

@ -206,6 +206,10 @@ class Location(BaseModel):
location_parts.append(country_name.upper())
else:
location_parts.append(country_name.title())
if (len(location_parts) == 0 and len(self.text) > 0):
return self.text
return ", ".join(location_parts)
def model_dump(self):
@ -254,7 +258,6 @@ class DescriptionFormat(Enum):
class JobPost(BaseModel):
# def __init__(self, obj):
# super().__init__()
# for key, value in obj.items():