about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-01-26 14:52:07 +0100
committerEugen Rochko <eugen@zeonfederated.com>2017-01-26 14:52:07 +0100
commitcc5c1e5febf588183145e30dc7e98e5ea33cd398 (patch)
tree80c8490331695b37452b6cfe4e75529d160ba6ee /app/models
parent2f18c77e448e105db691253ad04c83e4b862cbfe (diff)
Removed accidental n+1 query from notifications, updated some deps,
improved how "show more" link looks
Diffstat (limited to 'app/models')
-rw-r--r--app/models/notification.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/notification.rb b/app/models/notification.rb
index b7e8c9e71..b7b474869 100644
--- a/app/models/notification.rb
+++ b/app/models/notification.rb
@@ -66,6 +66,8 @@ class Notification < ApplicationRecord
   private
 
   def set_from_account
+    return unless new_record?
+
     case activity_type
     when 'Status', 'Follow', 'Favourite', 'FollowRequest'
       self.from_account_id = activity(false)&.account_id