Skip to content

Commit

Permalink
fix(test): WIP - error based on id_nomenclature
Browse files Browse the repository at this point in the history
Error message :
  raise sa_exc.InvalidRequestError(
sqlalchemy.exc.InvalidRequestError: 'TDatasets.nomenclature_data_origin' is not available due to lazy='raise'

See: FIXME of this commit
Reviewed-by: andriacap
  • Loading branch information
andriacap committed Mar 11, 2024
1 parent a254824 commit 1dc1532
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions backend/geonature/core/gn_synthese/imports/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ def update_batch_progress(batch, step):
if (
current_app.config["IMPORT"]["CHECK_PRIVATE_JDD_BLURING"]
# and not current_app.config["IMPORT"]["FILL_MISSING_NOMENCLATURE_WITH_DEFAULT_VALUE"] # XXX
# FIXME: raise sa_exc.InvalidRequestError(
# sqlalchemy.exc.InvalidRequestError: 'TDatasets.nomenclature_data_origin' is not available due to lazy='raise'
and imprt.dataset.nomenclature_data_origin.mnemonique == "Privée"
):
check_nomenclature_blurring(imprt, entity, fields["id_nomenclature_blurring"])
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""add column unique_dataset_id to t_imports_synthese and insert into bib_fields and cor_entity_field
Revision ID: 6e1852ecfea2
Revises: bfc90691737d
Revises: fe3d0b49ee14
Create Date: 2024-03-04 12:31:00.861460
"""
Expand All @@ -13,7 +13,7 @@

# revision identifiers, used by Alembic.
revision = "6e1852ecfea2"
down_revision = "bfc90691737d"
down_revision = "fe3d0b49ee14"
branch_labels = None
depends_on = None

Expand Down

0 comments on commit 1dc1532

Please sign in to comment.