Skip to content

Commit

Permalink
Update lib/report_generator.rb
Browse files Browse the repository at this point in the history
Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
  • Loading branch information
nattsw and tgxworld authored Jan 3, 2024
1 parent a945423 commit 4b928d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/report_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def generate(query_id, query_params, recipients)
query = DiscourseDataExplorer::Query.find(query_id)
return [] unless query

creator = User.find(@creator_user_id)
creator = User.find_by(id: @creator_user_id)
return [] unless Guardian.new(creator).can_send_private_messages?

return [] if recipients.empty?
Expand Down

0 comments on commit 4b928d5

Please sign in to comment.