Skip to content

Commit

Permalink
Black
Browse files Browse the repository at this point in the history
  • Loading branch information
amandine-sahl committed Aug 30, 2022
1 parent 60893da commit b604247
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions app/modules/oeasc/chasse/repositories.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,18 @@ def get_attribution_result(params):

query = DB.session.query(
func.count(TAttributions.id_attribution),
func.count(TAttributions.id_attribution).filter(TRealisationsChasse.id_realisation != None)
func.count(TAttributions.id_attribution).filter(
TRealisationsChasse.id_realisation != None
)
).join(
TTypeBracelets, TAttributions.id_type_bracelet == TTypeBracelets.id_type_bracelet
TTypeBracelets,
TAttributions.id_type_bracelet == TTypeBracelets.id_type_bracelet
).join(
TZoneCynegetiques, TAttributions.id_zone_cynegetique_affectee == TZoneCynegetiques.id_zone_cynegetique
TZoneCynegetiques,
TAttributions.id_zone_cynegetique_affectee == TZoneCynegetiques.id_zone_cynegetique
).outerjoin(
TRealisationsChasse, TAttributions.id_attribution == TRealisationsChasse.id_attribution
TRealisationsChasse,
TAttributions.id_attribution == TRealisationsChasse.id_attribution
)

for filter_key, filter_value in params.items():
Expand Down

0 comments on commit b604247

Please sign in to comment.