Skip to content

Commit

Permalink
fix(pipeline) : Fix soliguide,monenfant zone_diffusion issue
Browse files Browse the repository at this point in the history
When the zone_diffusion_code is not filled, the services are not
returned.

Following a fix about those zones in
b0c11dd, there was a tiny mistake (an
extra 's') that made 50_000 services become undiscoverable.

Since that can become a huge issue, let's enforce better data testing in
the pipeline to ensure it does not arise again.
  • Loading branch information
vperron authored and vmttn committed Oct 14, 2024
1 parent ec9ebce commit a3d604b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ zones_diffusion AS (
CASE
WHEN NOT (services.source = ANY(ARRAY['monenfant', 'action-logement', 'soliguide', 'reseau-alpha', 'mediation-numerique']))
THEN services.zone_diffusion_code
WHEN services.zone_diffusion_type = 'communes' AND adresses.code_insee IS NOT NULL
WHEN services.zone_diffusion_type = 'commune' AND adresses.code_insee IS NOT NULL
THEN adresses.code_insee
WHEN services.zone_diffusion_type = 'departement' AND adresses.code_departement IS NOT NULL
THEN adresses.code_departement
Expand All @@ -51,7 +51,7 @@ zones_diffusion AS (
CASE
WHEN NOT (services.source = ANY(ARRAY['monenfant', 'action-logement', 'soliguide', 'reseau-alpha', 'mediation-numerique']))
THEN services.zone_diffusion_nom
WHEN services.zone_diffusion_type = 'communes' AND adresses.commune IS NOT NULL
WHEN services.zone_diffusion_type = 'commune' AND adresses.commune IS NOT NULL
THEN adresses.commune
WHEN services.zone_diffusion_type = 'departement' AND departements.nom IS NOT NULL
THEN departements.nom
Expand Down

0 comments on commit a3d604b

Please sign in to comment.