A platform for community discussion. Free, open, simple.
FIX: Avoid reloading post in post events so that the revisor doesn't reset (#39284)
Natalie Tay97f0ddf757ab
diff --git a/plugins/discourse-calendar/plugin.rb b/plugins/discourse-calendar/plugin.rbindex 17ce6c6aab1..5278cd3526d 100644--- a/plugins/discourse-calendar/plugin.rb+++ b/plugins/discourse-calendar/plugin.rb@@ -243,7 +243,7 @@ after_initialize doon(:post_created) do |post|DiscoursePostEvent::Event.update_from_raw(post)- post.reload+ post.association(:event).reloadif SiteSetting.discourse_post_event_enabled && post.eventWebHook.enqueue_calendar_event_hooks(:calendar_event_created, post.event)end@@ -253,7 +253,7 @@ after_initialize doevent_before = post.eventhad_image_before = event_before&.image_upload_id.present?DiscoursePostEvent::Event.update_from_raw(post)- post.reload+ post.association(:event).reloadif SiteSetting.discourse_post_event_enabledif post.event&.image_upload_id