Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(PC-0000)[BO] fix: ceci est un test et cette PR sera bientot supprimé #14233

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion api/src/pcapi/core/bookings/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,8 @@ def cancel_booking_by_beneficiary(user: User, booking: Booking) -> None:
def cancel_booking_by_offerer(booking: Booking) -> None:
validation.check_booking_can_be_cancelled(booking)
_cancel_booking(booking, BookingCancellationReasons.OFFERER, raise_if_error=True)
push_notification_job.send_cancel_booking_notification.delay([booking.id])
if not FeatureToggle.WIP_DISABLE_NOTIFICATION_CANCEL_BOOKING.is_active():
push_notification_job.send_cancel_booking_notification.delay([booking.id])
user_emails_job.send_booking_cancellation_emails_to_user_and_offerer_job.delay(booking.id)


Expand Down
3 changes: 2 additions & 1 deletion api/src/pcapi/core/offers/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +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)

push_notification_job.send_cancel_booking_notification.delay([booking.id for booking in cancelled_bookings])
if not FeatureToggle.WIP_DISABLE_NOTIFICATION_CANCEL_BOOKING.is_active():
push_notification_job.send_cancel_booking_notification.delay([booking.id for booking in cancelled_bookings])
search.async_index_offer_ids(
[stock.offerId],
reason=search.IndexationReason.STOCK_DELETION,
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
Loading