Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:PnX-SI/GeoNature into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
TheoLechemia committed Aug 8, 2023
2 parents 679e563 + f6411c9 commit e7ba4e6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions backend/geonature/core/gn_synthese/utils/query_select_sqla.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,13 @@ def filter_other_filters(self, user):
# generic filters
for colname, value in self.filters.items():
if colname.startswith("area"):
self.add_join(CorAreaSynthese, CorAreaSynthese.id_synthese, self.model.id_synthese)
self.query = self.query.where(CorAreaSynthese.id_area.in_(value))
cor_area_synthese_alias = aliased(CorAreaSynthese)
self.add_join(
cor_area_synthese_alias,
cor_area_synthese_alias.id_synthese,
self.model.id_synthese,
)
self.query = self.query.where(cor_area_synthese_alias.id_area.in_(value))
elif colname.startswith("id_"):
col = getattr(self.model.__table__.columns, colname)
if isinstance(value, list):
Expand Down

0 comments on commit e7ba4e6

Please sign in to comment.