From a5340f6eb32037149065dddcbb988db05e7bbe48 Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Mon, 30 Mar 2020 09:23:32 +1100 Subject: [PATCH] FIX: event removal --- plugin.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugin.rb b/plugin.rb index 78e90fd..49a742f 100644 --- a/plugin.rb +++ b/plugin.rb @@ -270,6 +270,8 @@ def include_event_going_total? ) ::PostRevisor.track_topic_field(:event) do |tc, event| + event = event.present? ? event : {} + if tc.guardian.can_edit_event?(tc.topic.category) event_start = event['start'] ? event['start'].to_datetime.to_i : nil start_change = tc.record_change('event_start', tc.topic.custom_fields['event_start'], event_start)