Skip to content

Commit

Permalink
Fix cinema notification (#322)
Browse files Browse the repository at this point in the history
which raised `send_notification_to_topic() got an unexpected keyword
argument 'topic'`

fix: #306
  • Loading branch information
armanddidierjean authored Feb 4, 2024
1 parent fe96105 commit 21b27ba
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/endpoints/booking.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from app.models import models_booking, models_core
from app.schemas import schemas_booking
from app.schemas.schemas_notification import Message
from app.utils.communication.notifications import NotificationTool
from app.utils.tools import is_group_id_valid, is_user_member_of_an_allowed_group
from app.utils.types.booking_type import Decision
from app.utils.types.groups_type import GroupType
Expand Down Expand Up @@ -255,7 +256,7 @@ async def create_booking(
db: AsyncSession = Depends(get_db),
user: models_core.CoreUser = Depends(is_user_a_member),
settings: Settings = Depends(get_settings),
notification_tool=Depends(get_notification_tool),
notification_tool: NotificationTool = Depends(get_notification_tool),
):
"""
Create a booking.
Expand Down Expand Up @@ -284,7 +285,7 @@ async def create_booking(
expire_on=now.replace(day=now.day + 3),
)
await notification_tool.send_notification_to_topic(
topic=CustomTopic(topic=Topic.bookingadmin),
custom_topic=CustomTopic(topic=Topic.bookingadmin),
message=message,
)
except Exception as error:
Expand Down

0 comments on commit 21b27ba

Please sign in to comment.