Skip to content
This repository has been archived by the owner on Jun 17, 2023. It is now read-only.

Commit

Permalink
fixes group filter issue in sqlite (#414)
Browse files Browse the repository at this point in the history
  • Loading branch information
wesyoung authored Aug 16, 2018
1 parent 8eeea11 commit 015cba8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cif/store/sqlite/indicator.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,9 +397,14 @@ def _filter_groups(self, filters, token, s):
else:
groups = filters.get('groups')

if isinstance(groups, str):
if not isinstance(groups, list):
groups = [groups]

if PYVERSION < 3:
for g in groups:
if isinstance(g, unicode):
g = g.decode('utf-8')

s = s.filter(or_(Indicator.group == g for g in groups))
return s

Expand Down

0 comments on commit 015cba8

Please sign in to comment.