diff --git a/labonneboite/common/search.py b/labonneboite/common/search.py index 8e34b3f39..b9149ce00 100644 --- a/labonneboite/common/search.py +++ b/labonneboite/common/search.py @@ -276,7 +276,10 @@ def get_companies(self, add_suggestions=False): if self.company_count < 10 and add_suggestions: # Suggest other jobs. - alternative_rome_codes = ROME_MOBILITIES[self.rome] + try: + alternative_rome_codes = ROME_MOBILITIES[self.rome] + except KeyError: # FIXME regenerate rome_mobilities dataset after rome slicing + alternative_rome_codes = [] for rome in alternative_rome_codes: if not rome == self.rome: company_count = self._get_company_count(rome, self.distance)