Skip to content

Commit

Permalink
same to qgepdss and qgepsia405
Browse files Browse the repository at this point in the history
  • Loading branch information
sjib committed Jun 17, 2024
1 parent 15f6434 commit a1f3bf8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions qgepqwat2ili/qgepdss/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,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
3 changes: 3 additions & 0 deletions qgepqwat2ili/qgepsia405/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,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 a1f3bf8

Please sign in to comment.