commit | c030be6f24640b0d9aceef4ff5dd0a87a7802bbd | [log] [tgz] |
---|---|---|
author | Tony Mack <tmack@cs.princeton.edu> | Wed Jul 29 13:06:57 2015 -0400 |
committer | Tony Mack <tmack@cs.princeton.edu> | Wed Jul 29 13:06:57 2015 -0400 |
tree | d865afa503dfefc33d7c9fdf1fbb2812e8aa0b4c | |
parent | 665667228fc7d32fdcd4de3b2d086c4251f45bac [diff] |
fix bug in select_by_user
diff --git a/xos/core/models/slicetag.py b/xos/core/models/slicetag.py index 7376c88..a335ce0 100644 --- a/xos/core/models/slicetag.py +++ b/xos/core/models/slicetag.py
@@ -19,6 +19,6 @@ if user.is_admin: qs = SliceTag.objects.all() else: - st_ids = [st.id for st in SliceTag.objects.filter(user=user)] - qs = SliceTag.objects.filter(id__in=st_ids) + slices = Slice.select_by_user(user) + qs = SliceTag.objects.filter(slice__in=slices) return qs