Skip to content

Commit

Permalink
Api/Notes#feed: return only a max of result_limit NoteComment objects
Browse files Browse the repository at this point in the history
  • Loading branch information
grekko committed Feb 26, 2024
1 parent 0956142 commit d5feee1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/controllers/api/notes_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,12 @@ def feed
else
note.comments
end
end
end.take(result_limit)
# FIXME: notes_refactoring
# Migrated and new Note records do not have the extra `open`-NoteComment
# so these are synthesized by calling Note#comments_with_extra_open_comment
# thus we might be ending up with more NoteComment-objects than asked for
# for with result_limit.

# Render the result
respond_to do |format|
Expand Down

0 comments on commit d5feee1

Please sign in to comment.