diff --git a/qgepqwat2ili/utils/qgep_export_utils.py b/qgepqwat2ili/utils/qgep_export_utils.py index 80ae9fe7..d6b8ecda 100644 --- a/qgepqwat2ili/utils/qgep_export_utils.py +++ b/qgepqwat2ili/utils/qgep_export_utils.py @@ -1067,7 +1067,7 @@ def export_cover(self): # ) # filtering only on wastewater_structures that are in subset_wws_ids if self.filtered: - query = query.join(self.qgep_model.wastewater_structure).filter( + query = query.join(self.qgep_model.wastewater_structure, cover.fk_wastewater_structure = wastewater_structure.obj_id).filter( self.qgep_model.wastewater_structure.obj_id.in_(self.subset_wws_ids) ) # add sql statement to logger @@ -1116,7 +1116,7 @@ def export_cover(self): def export_cover_ws_off_sia405abwasser(self): query = self.qgep_session.query(self.qgep_model.cover) # if ws_off_sia405abwasser always filter out with subset_wws_ids - query = query.join(self.qgep_model.wastewater_structure).filter( + query = query.join(self.qgep_model.wastewater_structure, cover.fk_wastewater_structure = wastewater_structure.obj_id).filter( self.qgep_model.wastewater_structure.obj_id.in_(self.subset_wws_ids) ) # add sql statement to logger