]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/note.rb
Merge branch 'pull/5631'
[rails.git] / app / models / note.rb
index d37b863e53b5a77224375fc48990860144171cfe..807ee9ec8b99a7e021ac9ba8b46963c2f74cd2a8 100644 (file)
@@ -94,7 +94,7 @@ class Note < ApplicationRecord
   # Return the note's description, derived from the first comment
   def description
     if user_ip.nil? && user_id.nil?
-      comments.first.body
+      all_comments.first.body
     else
       RichText.new("text", super)
     end
@@ -103,7 +103,7 @@ class Note < ApplicationRecord
   # Return the note's author object, derived from the first comment
   def author
     if user_ip.nil? && user_id.nil?
-      comments.first.author
+      all_comments.first.author
     else
       super
     end