Skip to content

Commit

Permalink
fix skip empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Lhcfl committed Aug 26, 2024
1 parent f2c0e00 commit e7fa81a
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 @@ -12,7 +12,7 @@ def self.generate(query_id, query_params, recipients, opts = {})
result = DataExplorer.run_query(query, params)
query.update!(last_run_at: Time.now)

return [] if opts[:skip_empty] && result.values.empty?
return [] if opts[:skip_empty] && result[:pg_result].values.empty?
table = ResultToMarkdown.convert(result[:pg_result])

build_report_pms(query, table, recipients, opts: { attach_csv: opts[:attach_csv], result: })
Expand Down

0 comments on commit e7fa81a

Please sign in to comment.