Skip to content

Commit

Permalink
add ALL DEFERRED
Browse files Browse the repository at this point in the history
  • Loading branch information
sjib committed Jun 17, 2024
1 parent 2e8447d commit 15f6434
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions qgepqwat2ili/qgep/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ def qgep_export(selection=None, labels_file=None, orientation=None):
abwasser_session = Session(utils.sqlalchemy.create_engine(), autocommit=False, autoflush=False)
tid_maker = utils.ili2db.TidMaker(id_attribute="obj_id")

# backport from tww https://github.com/teksi/wastewater/blob/3acfba249866d299f8a22e249d9f1e475fe7b88d/plugin/teksi_wastewater/interlis/interlis_model_mapping/interlis_exporter_to_intermediate_schema.py#L83
abwasser_session.execute(text("SET CONSTRAINTS ALL DEFERRED;"))

# Filtering
filtered = selection is not None
subset_ids = selection if selection is not None else []
Expand Down

0 comments on commit 15f6434

Please sign in to comment.