Skip to content

Commit

Permalink
Merge pull request #31 from uc-cdis/fix/getwparams
Browse files Browse the repository at this point in the history
Fix/getwparams
  • Loading branch information
zflamig authored Jun 13, 2018
2 parents 7d000de + 56b1c24 commit d09e46d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions indexclient/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,11 @@ 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]
did = json['did']
return Document(self, did, 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 d09e46d

Please sign in to comment.