Skip to content

Commit

Permalink
(PC-0000)[BO] fix: ceci est un test et cette PR sera bientot supprimé
Browse files Browse the repository at this point in the history
  • Loading branch information
borisLeBonPro committed Sep 19, 2024
1 parent b4bbbdc commit 4fccfab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/src/pcapi/core/offers/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -944,6 +944,8 @@ def _delete_stock(stock: models.Stock, author_id: int | None = None, user_connec
transactional_mails.send_booking_cancellation_by_pro_to_beneficiary_email(booking)
transactional_mails.send_booking_cancellation_confirmation_by_pro_email(cancelled_bookings)

if not FeatureToggle.WIP_DISABLE_NOTIFICATION_CANCEL_BOOKING.is_active():
print("ceci est un test j'ajoute juste quelque chose pour voir")
push_notification_job.send_cancel_booking_notification.delay([booking.id for booking in cancelled_bookings])
search.async_index_offer_ids(
[stock.offerId],
Expand Down
2 changes: 2 additions & 0 deletions api/src/pcapi/models/feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ class FeatureToggle(enum.Enum):
WIP_ENABLE_NEW_COLLECTIVE_OFFERS_AND_BOOKINGS_STRUCTURE = (
"Activer la nouvelle structure des offres et réservations collectives"
)
WIP_DISABLE_NOTIFICATION_CANCEL_BOOKING = "test"

def is_active(self) -> bool:
if flask.has_request_context():
Expand Down Expand Up @@ -187,6 +188,7 @@ def nameKey(self) -> str:
FeatureToggle.WIP_USE_OFFERER_ADDRESS_AS_DATA_SOURCE,
FeatureToggle.WIP_SPLIT_OFFER,
FeatureToggle.WIP_SUGGESTED_SUBCATEGORIES,
FeatureToggle.WIP_DISABLE_NOTIFICATION_CANCEL_BOOKING
# Please keep alphabetic order
)

Expand Down

0 comments on commit 4fccfab

Please sign in to comment.