Skip to content
This repository was archived by the owner on Nov 15, 2024. It is now read-only.

Commit ee44cdd

Browse files
committed
rome_mobilities quick dirty fix
1 parent 4954b04 commit ee44cdd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

labonneboite/common/search.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,10 @@ def get_companies(self):
155155
if self.company_count < 10:
156156

157157
# Suggest other jobs.
158-
alternative_rome_codes = settings.ROME_MOBILITIES[self.rome]
158+
try:
159+
alternative_rome_codes = settings.ROME_MOBILITIES[self.rome]
160+
except KeyError: # FIXME regenerate rome_mobilities dataset after rome slicing
161+
alternative_rome_codes = []
159162
for rome in alternative_rome_codes:
160163
if not rome == self.rome:
161164
company_count = self._get_company_count(rome, self.distance)

0 commit comments

Comments
 (0)