Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
DataInclusionClient.search_services(): utilisation du dictionnaire de…
Browse files Browse the repository at this point in the history
… correspondances de thématiques
  • Loading branch information
ggounot committed Oct 1, 2024
1 parent 1d49725 commit e488f70
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion dora/data_inclusion/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import requests
from django.conf import settings

from .constants import THEMATIQUES_MAPPING_DORA_TO_DI

logger = logging.getLogger(__name__)


Expand Down Expand Up @@ -120,7 +122,12 @@ def search_services(
url.args["code_insee"] = code_insee

if thematiques is not None:
url.args["thematiques"] = thematiques
enriched_thematiques = []
for thematique in thematiques:
enriched_thematiques += THEMATIQUES_MAPPING_DORA_TO_DI.get(
thematique, [thematique]
)
url.args["thematiques"] = enriched_thematiques

if types is not None:
url.args["types"] = types
Expand Down

0 comments on commit e488f70

Please sign in to comment.