Skip to content

Commit

Permalink
revert change to Query.facets() (#293)
Browse files Browse the repository at this point in the history
  • Loading branch information
davecap committed Mar 7, 2019
1 parent 92bbcae commit 197d2d9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion solvebio/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,9 @@ def facets(self, *args, **kwargs):
if not isinstance(f, six.string_types):
raise AttributeError('Facet field arguments must be strings')

q = self.limit(0).execute(offset=0, facets=facets)
q = self._clone()
q._limit = 0
q.execute(offset=0, facets=facets)
return q._response.get('facets')

def __len__(self):
Expand Down

0 comments on commit 197d2d9

Please sign in to comment.