Fixed scheduled event end update #410
All checks were successful
Deploy staging on push / on-push-deploy_sh-edraft (push) Successful in 4m41s
Deploy dev on push / on-push-deploy_sh-edraft (push) Successful in 3m39s

This commit is contained in:
Sven Heidemann 2023-12-01 21:04:29 +01:00
parent 285b8bdbe4
commit af3084ad36

View File

@ -37,10 +37,10 @@ class BaseOnScheduledEventUpdateEvent(OnScheduledEventUpdateABC):
if before.status != after.status and (
after.status.value == EventStatus.cancelled.value or after.status.value == EventStatus.completed.value
):
await self._events.check_and_create_scheduled_events(before.guild)
event = self._events.get_active_event(after)
if event is None:
return
self._events.remove_event(event)
await self._events.check_and_create_scheduled_events(before.guild)
self._logger.debug(__name__, f"Module {type(self)} stopped")