was erroring when job post had countryname not in mapping

pull/91/head
WillBlears 2023-11-17 07:11:32 -05:00
parent 0bcfd6a6f6
commit 3dc8c0c066
1 changed files with 6 additions and 1 deletions

View File

@ -280,10 +280,15 @@ class LinkedInScraper(Scraper):
)
elif len(parts) == 3:
city, state, country = parts
try:
country_enum = Country.from_string(country)
except ValueError:
country_enum = Country.from_string(self.country)
location = Location(
city=city,
state=state,
country=Country.from_string(country),
country=country_enum,
)
return location