Skip to content

Commit

Permalink
fix track_comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
Roger Lee authored Sep 18, 2017
1 parent d198a9f commit 8b67da8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bootcamp/feeds/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,10 @@ def update(request):
def track_comments(request):
feed_id = request.GET.get('feed')
feed = Feed.objects.get(pk=feed_id)
return render(request, 'feeds/partial_feed_comments.html', {'feed': feed})
if len(feed.get_comments()) > 0:
return render(request, 'feeds/partial_feed_comments.html', {'feed': feed})
else:
return HttpResponse()


@login_required
Expand Down

0 comments on commit 8b67da8

Please sign in to comment.