Skip to content

Commit

Permalink
Merge pull request #49 from ReadNow-C14/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Meefx authored Dec 6, 2023
2 parents 20aca14 + 93074af commit f853264
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rekomendasi/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ def get_recommendations_json_by_id(request, id):
if not has_recommendations(book):
init_recommend_book(book)

recommendation_books = BookRecommendation.objects.filter(source_book=book)
recommendation_id = book.get_indices_as_list()

recommendation_books = Book.objects.filter(pk__in=recommendation_id)
return HttpResponse(serializers.serialize("json",recommendation_books),content_type="application/json")

@csrf_exempt
Expand Down

0 comments on commit f853264

Please sign in to comment.