From 33f5169f36e91fc4e9ec2099700aae8dd4b4ce14 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sat, 26 Dec 2020 15:28:29 +0100 Subject: [PATCH] core: fix formatting --- authentik/core/views/user.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/authentik/core/views/user.py b/authentik/core/views/user.py index cc36cd55d..9112e1ea2 100644 --- a/authentik/core/views/user.py +++ b/authentik/core/views/user.py @@ -114,9 +114,13 @@ class TokenUpdateView( def get_object(self) -> Token: identifier = self.kwargs.get("identifier") - return get_objects_for_user( - self.request.user, self.permission_required, self.model - ).filter(intent=TokenIntents.INTENT_API, identifier=identifier).first() + return ( + get_objects_for_user( + self.request.user, self.permission_required, self.model + ) + .filter(intent=TokenIntents.INTENT_API, identifier=identifier) + .first() + ) class TokenDeleteView(LoginRequiredMixin, PermissionRequiredMixin, DeleteMessageView): @@ -130,6 +134,10 @@ class TokenDeleteView(LoginRequiredMixin, PermissionRequiredMixin, DeleteMessage def get_object(self) -> Token: identifier = self.kwargs.get("identifier") - return get_objects_for_user( - self.request.user, self.permission_required, self.model - ).filter(intent=TokenIntents.INTENT_API, identifier=identifier).first() + return ( + get_objects_for_user( + self.request.user, self.permission_required, self.model + ) + .filter(intent=TokenIntents.INTENT_API, identifier=identifier) + .first() + )