Skip to content

Commit

Permalink
(PC-31353)[API] fix: fix collective offers route to return draft temp…
Browse files Browse the repository at this point in the history
…late offers
  • Loading branch information
anoukhello committed Aug 22, 2024
1 parent 6037546 commit 8b74d30
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions api/src/pcapi/core/offers/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,7 @@ def get_collective_offers_template_by_filters(
period_ending_date: datetime.date | None = None,
formats: list[subcategories.EacFormat] | None = None,
) -> BaseQuery:
query = educational_models.CollectiveOfferTemplate.query.filter(
educational_models.CollectiveOfferTemplate.validation != models.OfferValidationStatus.DRAFT
)
query = educational_models.CollectiveOfferTemplate.query

if period_beginning_date is not None or period_ending_date is not None:
query = query.filter(sa.false())
Expand Down

0 comments on commit 8b74d30

Please sign in to comment.