Skip to content

Commit

Permalink
fix: Don’t load message events when SparkPost API key is blank
Browse files Browse the repository at this point in the history
  • Loading branch information
sman591 committed Jul 12, 2019
1 parent 271b49e commit a989d02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/questionnaire.rb
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def did_rsvp?
end

def message_events
return [] unless ENV['SPARKPOST_API_KEY']
return [] unless ENV["SPARKPOST_API_KEY"].presence

simple_spark = SimpleSpark::Client.new
simple_spark.message_events.search(recipients: email)
Expand Down

0 comments on commit a989d02

Please sign in to comment.