From 6758427dacbb806502cafb48593342ff2d7fe0a6 Mon Sep 17 00:00:00 2001 From: Miguel Angel G Date: Fri, 1 May 2020 14:19:10 -0500 Subject: [PATCH] Add fix for follow/following --- app/dashboard/templates/profiles/tab_follow.html | 4 ++-- app/dashboard/views.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/dashboard/templates/profiles/tab_follow.html b/app/dashboard/templates/profiles/tab_follow.html index b1f5b336fa1..2d0cadfcb47 100644 --- a/app/dashboard/templates/profiles/tab_follow.html +++ b/app/dashboard/templates/profiles/tab_follow.html @@ -38,7 +38,7 @@
- {% with followers=user.mutual_following %} + {% with followers=user.mutual_following|slice:":4" %}
{% for follower in followers %} {% if forloop.last %} @@ -93,7 +93,7 @@
- {% with followers=user.mutual_follower %} + {% with followers=user.mutual_follower|slice:":4" %}
{% for follower in followers %} {% if forloop.last %} diff --git a/app/dashboard/views.py b/app/dashboard/views.py index cdce115056c..b897665dfbf 100644 --- a/app/dashboard/views.py +++ b/app/dashboard/views.py @@ -2818,8 +2818,8 @@ def profile(request, handle, tab=None): context['feedbacks_got'] = [fb.pk for fb in profile.feedbacks_got.all() if fb.visible_to(request.user)] context['all_feedbacks'] = context['feedbacks_got'] + context['feedbacks_sent'] context['tags'] = [('#announce','bullhorn'), ('#mentor','terminal'), ('#jobs','code'), ('#help','laptop-code'), ('#other','briefcase'), ] - context['followers'] = TribeMember.objects.filter(org=request.user.profile) - context['following'] = TribeMember.objects.filter(profile=request.user.profile) + context['followers'] = TribeMember.objects.filter(org=profile) + context['following'] = TribeMember.objects.filter(profile=profile) context['foltab'] = request.GET.get('sub', 'followers') tab = get_profile_tab(request, profile, tab, context)