From 6afe93d4f88f4d0839d3bfda1cdbe1e9fea8ca89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Reuiller?= Date: Fri, 20 Oct 2023 17:30:26 +0200 Subject: [PATCH] remove useless API entreprise enrich because it's done by a cron --- .../management/commands/import_esat_from_asp.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/lemarche/siaes/management/commands/import_esat_from_asp.py b/lemarche/siaes/management/commands/import_esat_from_asp.py index 4cb955a95..0c12596b0 100644 --- a/lemarche/siaes/management/commands/import_esat_from_asp.py +++ b/lemarche/siaes/management/commands/import_esat_from_asp.py @@ -8,7 +8,6 @@ from lemarche.siaes import constants as siae_constants from lemarche.siaes.models import Siae -from lemarche.utils.apis.api_entreprise import etablissement_get_or_error # exercice_get_or_error from lemarche.utils.apis.geocoding import get_geocoding_data from lemarche.utils.constants import DEPARTMENT_TO_REGION, department_from_postcode from lemarche.utils.data import rename_dict_key @@ -137,20 +136,6 @@ def import_esat(self, esat): # noqa C901 rename_dict_key(esat, "N° de Siret", "siret") esat["siret_is_valid"] = True - # enrich with API Entreprise - etablissement, error = etablissement_get_or_error( - esat["siret"], reason="Mise à jour données Marché de la plateforme de l'Inclusion" - ) - if etablissement: - print(etablissement) - esat["nature"] = Siae.NATURE_HEAD_OFFICE if etablissement["is_head_office"] else Siae.NATURE_ANTENNA - esat["is_active"] = False if etablissement["is_closed"] else True - esat["naf"] = etablissement["naf"] - if etablissement["employees"]: - esat["api_entreprise_employees"] = etablissement["employees"] - if etablissement["date_constitution"]: - esat["api_entreprise_date_constitution"] = etablissement["date_constitution"] - full_address = esat.pop("Adresse") # create object