Skip to content

Commit

Permalink
compatibility with TaxHubV2
Browse files Browse the repository at this point in the history
  • Loading branch information
jacquesfize committed Aug 8, 2024
1 parent de90640 commit 879b842
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions backend/gn_module_import/checks/sql/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from geonature.core.gn_synthese.models import Synthese, TSources
from ref_geo.models import LAreas, BibAreasTypes
from pypnnomenclature.models import TNomenclatures, BibNomenclaturesTypes
from apptax.taxonomie.models import Taxref, CorNomListe, BibNoms
from apptax.taxonomie.models import Taxref, cor_nom_liste
from pypn_habref_api.models import Habref


Expand Down Expand Up @@ -211,9 +211,10 @@ def check_cd_nom(imprt, fields):
# Filter out on a taxhub list if provided
list_id = current_app.config["IMPORT"].get("ID_LIST_TAXA_RESTRICTION", None)
if list_id is not None:
reference_table = join(Taxref, BibNoms).join(
CorNomListe,
sa.and_(BibNoms.id_nom == CorNomListe.id_nom, CorNomListe.id_liste == list_id),
reference_table = join(
Taxref,
cor_nom_liste,
sa.and_(cor_nom_liste.c.id_liste == list_id, Taxref.cd_nom == cor_nom_liste.c.cd_nom),
)
else:
reference_table = Taxref
Expand Down
2 changes: 1 addition & 1 deletion dependencies/GeoNature
Submodule GeoNature updated 255 files

0 comments on commit 879b842

Please sign in to comment.