Skip to content

Commit

Permalink
Don't load authed algolia key if credentials are missing
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewdias committed Nov 1, 2018
1 parent 79df477 commit 1240228
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Contents/Code/kitsu.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,10 @@ def refresh(refresh_token):
return login(username, password)

def algolia_key():
media_key = Data.Load('algolia_media')
if media_key is not None:
return media_key
if Prefs['kitsu_username'] is not None and Prefs['kitsu_password'] is not None:
media_key = Data.Load('algolia_media')
if media_key is not None:
return media_key

headers = {
'Accept': 'application/vnd.api+json',
Expand Down

0 comments on commit 1240228

Please sign in to comment.