Fix sort key error

This commit is contained in:
cuom1999 2022-04-12 11:53:39 -05:00
parent e9725d27aa
commit 5c6391fb76
2 changed files with 5 additions and 4 deletions

View file

@ -646,8 +646,9 @@ class ProblemFeed(FeedView):
cl_model = CollabFilter()
dot_rec = cl_model.user_recommendations(user, queryset, cl_model.DOT, 100)
cosine_rec = cl_model.user_recommendations(user, queryset, cl_model.COSINE, 100)
hot_problems_rec = hot_problems(timedelta(days=7), 10)
hot_problems_rec = [problem for problem in hot_problems(timedelta(days=7), 10)
if problem in queryset]
q = self.merge_recommendation([dot_rec, cosine_rec, hot_problems_rec])
return q