Skip to content

A platform for community discussion. Free, open, simple.

FIX: Don't silently fail if notification fails to create.

Guo Xiang Tanbe49da9105ae
diff --git a/app/services/post_alerter.rb b/app/services/post_alerter.rb
index 66648a69ee0..d5539e34c6f 100644
--- a/app/services/post_alerter.rb
+++ b/app/services/post_alerter.rb
@@ -379,7 +379,7 @@ class PostAlerter
end
# Create the notification
- created = user.notifications.create(
+ created = user.notifications.create!(
notification_type: type,
topic_id: post.topic_id,
post_number: post.post_number,