mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 14:39:16 +02:00
Blacked the code
This commit is contained in:
parent
b6fc0051fa
commit
62ca3bd736
279 changed files with 8861 additions and 9527 deletions
|
@ -7,15 +7,13 @@ from . import actors
|
|||
|
||||
|
||||
class LibraryFollower(BasePermission):
|
||||
|
||||
def has_permission(self, request, view):
|
||||
if not preferences.get('federation__music_needs_approval'):
|
||||
if not preferences.get("federation__music_needs_approval"):
|
||||
return True
|
||||
|
||||
actor = getattr(request, 'actor', None)
|
||||
actor = getattr(request, "actor", None)
|
||||
if actor is None:
|
||||
return False
|
||||
|
||||
library = actors.SYSTEM_ACTORS['library'].get_actor_instance()
|
||||
return library.received_follows.filter(
|
||||
approved=True, actor=actor).exists()
|
||||
library = actors.SYSTEM_ACTORS["library"].get_actor_instance()
|
||||
return library.received_follows.filter(approved=True, actor=actor).exists()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue