Skip to content

Commit

Permalink
fix error reporting about id
Browse files Browse the repository at this point in the history
  • Loading branch information
nlehuby committed Oct 6, 2024
1 parent ed3d773 commit 0576c06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions group_opendata_by_station.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,15 @@ def transformRef(refIti, refLoc):
# Overkill given that this data should have passed through this code:
# https://github.com/datagouv/datagouvfr_data_pipelines/blob/75db0b1db3fd79407a1526b0950133114fefaa0f/schema/utils/geo.py#L33
if not validate_coord(row["consolidated_longitude"]) or not validate_coord(row["consolidated_latitude"]):
errors.append({"station_id" : cleanRef,
errors.append({"station_id" : cleanRef or row['id_station_itinerance'],
"source": row['datagouv_organization_or_owner'],
"error": "coordonnées non valides. Ce point de charge est ignoré et sa station ne sera pas présente dans l'analyse Osmose",
"detail": "consolidated_longitude: {}, consolidated_latitude: {}".format(row['consolidated_longitude'], row["consolidated_latitude"])
})
continue

if not is_correct_id(cleanRef):
errors.append({"station_id" : cleanRef,
errors.append({"station_id" : cleanRef or row['id_station_itinerance'],
"source": row['datagouv_organization_or_owner'],
"error": "le format de l'identifiant ref:EU:EVSE (id_station_itinerance) n'est pas valide. Ce point de charge est ignoré et sa station ne sera pas présente dans l'analyse Osmose",
"detail": "iti: %s, local: %s" % (row['id_station_itinerance'], row['id_station_local'])})
Expand Down

0 comments on commit 0576c06

Please sign in to comment.