Skip to content
This repository was archived by the owner on Jun 5, 2019. It is now read-only.

Commit 1bbad01

Browse files
Correctly escape aggregated journal notes_id
[ci skip]
1 parent 3864674 commit 1bbad01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/models/journal/aggregated_journal.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def with_notes_id(notes_id)
5656
# Therefore we have to provide the notes_id to the aggregation on top of it being used
5757
# in the where clause to pick the desired AggregatedJournal.
5858
raw_journal = query_aggregated_journals(journal_id: notes_id)
59-
.where("#{table_name}.id = #{notes_id}")
59+
.where("#{table_name}.id = ?", notes_id)
6060
.first
6161

6262
raw_journal ? Journal::AggregatedJournal.new(raw_journal) : nil

0 commit comments

Comments
 (0)