Skip to content

Commit 837bae6

Browse files
author
Justin Roberts
committed
Merge pull request pardot#21 from flushentitypacket/master
Handle nil response when authenticating.
2 parents 3c468a5 + 5c50809 commit 837bae6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/pardot/authentication.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module Authentication
33

44
def authenticate
55
resp = post "login", nil, :email => @email, :password => @password, :user_key => @user_key
6-
@api_key = resp["api_key"]
6+
@api_key = resp && resp["api_key"]
77
end
88

99
def authenticated?

0 commit comments

Comments
 (0)