[openstreetmap/openstreetmap-website] Displays "unknown" description for notes with missing opening comment (PR #5712)

Nenad Vujicic notifications at github.com
Thu Feb 20 22:09:28 UTC 2025


@nenad-vujicic commented on this pull request.



> @@ -43,7 +43,7 @@ def show
 
     @note_includes_anonymous = @note.author.nil? || @note_comments.find { |comment| comment.author.nil? }
 
-    @note_comments = @note_comments.drop(1) if @note.author.nil? || @note.author.active?
+    @note_comments = @note_comments.drop(1) if (@note.author.nil? || @note.author.active?) && @note.description.present?

Thanks. Just updated to use check if first comment is of type `opened` (in entire PR).

It drops first comment (because it's used as description) if its author is not deleted (otherwise it would display "deleted" as description) and if first comment is opening (otherwise it would display "unknown" as description).

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5712#discussion_r1964406921
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/5712/review/2631270891 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250220/62f93de4/attachment.htm>


More information about the rails-dev mailing list