diff --git a/src/applications/calendar/storage/PhabricatorCalendarEvent.php b/src/applications/calendar/storage/PhabricatorCalendarEvent.php index 5b64fdea53..b2e81b0e8b 100644 --- a/src/applications/calendar/storage/PhabricatorCalendarEvent.php +++ b/src/applications/calendar/storage/PhabricatorCalendarEvent.php @@ -1343,7 +1343,21 @@ final class PhabricatorCalendarEvent extends PhabricatorCalendarDAO PhabricatorDestructionEngine $engine) { $this->openTransaction(); - $this->delete(); + $invitees = id(new PhabricatorCalendarEventInvitee())->loadAllWhere( + 'eventPHID = %s', + $this->getPHID()); + foreach ($invitees as $invitee) { + $invitee->delete(); + } + + $notifications = id(new PhabricatorCalendarNotification())->loadAllWhere( + 'eventPHID = %s', + $this->getPHID()); + foreach ($notifications as $notification) { + $notification->delete(); + } + + $this->delete(); $this->saveTransaction(); }