Skip to content
Snippets Groups Projects
Commit fc7d551f authored by Fynn Becker's avatar Fynn Becker :crab:
Browse files

Fix #11 Return a dict when indexing lazy result

parent c4769ed7
Branches
Tags
No related merge requests found
......@@ -142,9 +142,8 @@ class LazyPostgrestJsonResult:
if key.stop is not None and key.stop <= start:
return list()
range = '{start}-{stop}'.format(start=start, stop=key.stop - 1 if key.stop is not None else '')
else:
range = '{0}-{0}'.format(key)
return self._fetch_range(range)
return self._fetch_range('{0}-{0}'.format(key))[0] # single element requested, return dict
def refresh_from_pgrest(self):
"""Lazily refresh data from PostgREST"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment