diff --git a/explorer/views/list.py b/explorer/views/list.py index 3df7e222..48b15d14 100644 --- a/explorer/views/list.py +++ b/explorer/views/list.py @@ -87,7 +87,7 @@ def _build_queries_and_headers(self): pattern = re.compile(r'[\W_]+') headers = Counter([q.title.split(' - ')[0] for q in self.object_list]) - query_favorites_for_user = QueryFavorite.objects.filter(user_id=self.request.user.id).values_list('query_id', + query_favorites_for_user = QueryFavorite.objects.filter(user_id=self.request.user.pk).values_list('query_id', flat=True) for q in self.object_list: