From 4972d760e2809122af54060252be14a638cc87cc Mon Sep 17 00:00:00 2001
From: Eliot Berriot <contact@eliotberriot.com>
Date: Tue, 15 Oct 2019 10:56:00 +0200
Subject: [PATCH] Apply suggestion to api/funkwhale_api/common/filters.py

---
 api/funkwhale_api/common/filters.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/api/funkwhale_api/common/filters.py b/api/funkwhale_api/common/filters.py
index 6706fa221c..a2b9ba42ae 100644
--- a/api/funkwhale_api/common/filters.py
+++ b/api/funkwhale_api/common/filters.py
@@ -198,8 +198,6 @@ class ActorScopeFilter(filters.CharFilter):
         return qs
 
     def filter_me(self, user, queryset):
-        actor = getattr(user, "actor", None)
-        if not actor:
-            return queryset.none()
+        actor = user.actor
 
         return queryset.filter(**{self.actor_field: actor})
-- 
GitLab