Skip to content

Commit

Permalink
Fix rake task crash when not using default app (so there is no pem file)
Browse files Browse the repository at this point in the history
  • Loading branch information
rdj authored and cqr committed Dec 13, 2010
1 parent c69bf3b commit 51c4714
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/apn_on_rails/app/models/apn/app.rb
Expand Up @@ -31,8 +31,8 @@ def self.send_notifications
apps.each do |app|
app.send_notifications
end
global_cert = File.read(configatron.apn.cert)
if global_cert
if !configatron.apn.cert.blank?
global_cert = File.read(configatron.apn.cert)
send_notifications_for_cert(global_cert, nil)
end
end
Expand Down Expand Up @@ -123,8 +123,8 @@ def self.process_devices
apps.each do |app|
app.process_devices
end
global_cert = File.read(configatron.apn.cert)
if global_cert
if !configatron.apn.cert.blank?
global_cert = File.read(configatron.apn.cert)
APN::App.process_devices_for_cert(global_cert)
end
end
Expand Down

0 comments on commit 51c4714

Please sign in to comment.