Skip to content

Commit

Permalink
Merge pull request #21 from flushentitypacket/master
Browse files Browse the repository at this point in the history
Handle nil response when authenticating.
  • Loading branch information
Justin Roberts committed Feb 25, 2016
2 parents 3c468a5 + 5c50809 commit 837bae6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/pardot/authentication.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module Authentication

def authenticate
resp = post "login", nil, :email => @email, :password => @password, :user_key => @user_key
@api_key = resp["api_key"]
@api_key = resp && resp["api_key"]
end

def authenticated?
Expand Down

0 comments on commit 837bae6

Please sign in to comment.