Skip to content

Commit

Permalink
code_qv no longer used
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastienReuiller committed Jul 1, 2024
1 parent 561d689 commit 36b53d2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lemarche/utils/apis/api_qpv.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ def is_in_qpv(latitude, longitude, distance=DISTANCE_TO_VALIDATE_QPV, client=Non
records = data["records"]
if records:
qpv = records[0]
return {IS_QPV_KEY: True, QPV_NAME_KEY: qpv["fields"]["nom_qp"], QPV_CODE_KEY: qpv["fields"]["code_qp"]}
return {
IS_QPV_KEY: True,
QPV_NAME_KEY: qpv["fields"]["nom_qp"],
QPV_CODE_KEY: qpv["fields"]["identifiant"],
}
return {IS_QPV_KEY: False}
except requests.exceptions.HTTPError as e:
logger.error("Error while fetching `%s`: %s", e.request.url, e)
Expand Down

0 comments on commit 36b53d2

Please sign in to comment.