Skip to content

Commit

Permalink
fix(getparams): use returned record
Browse files Browse the repository at this point in the history
  • Loading branch information
zflamig committed Jun 13, 2018
1 parent 7d000de commit 8de9359
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions indexclient/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ def get_with_params(self, params=None):
return None
else:
raise e
if not response.json()['ids']:
if not response.json()['records']:
return None
did = response.json()['ids'][0]
return Document(self, did)
json = response.json()['records'][0]
return Document(self, json=json)

def list(self, limit=float("inf"), start=None, page_size=100):
""" Returns a generator of document objects. """
Expand Down

0 comments on commit 8de9359

Please sign in to comment.