fix(commune): fix ‘undefined’ departement codes
This commit is contained in:
parent
b0f4c578a6
commit
1d10e59e63
3 changed files with 38 additions and 2 deletions
|
@ -5,7 +5,7 @@ class Migrations::NormalizeCommunesJob < ApplicationJob
|
|||
|
||||
value_json = champ.value_json || {}
|
||||
|
||||
if !champ.departement?
|
||||
if !champ.departement? || champ.code_departement == 'undefined'
|
||||
metro_code = champ.external_id[0..1]
|
||||
drom_com_code = champ.external_id[0..2]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue