### Description

PR fixes bug where a note of deleted user has no comments, but the code tries 
to access the first comment by switching to using `.all_comments` (instead of 
`.comments`) and removing dropping first comment (if author is deleted) when 
displaying notes comments in sidebar.

Suggested 
[here](https://github.com/openstreetmap/openstreetmap-website/pull/5579#issuecomment-2634185487).

### How has this been tested?

Automated tests, manual testing before and after migration.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/5609

-- Commit Summary --

  * Switches from comments to all_comments
  * Removes dropping note's first comment

-- File Changes --

    M app/models/note.rb (4)
    M app/views/notes/show.html.erb (4)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/5609.patch
https://github.com/openstreetmap/openstreetmap-website/pull/5609.diff

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

Message ID: <openstreetmap/openstreetmap-website/pull/5...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to