core: fix formatting

This commit is contained in:
Jens Langhammer 2020-12-26 15:28:29 +01:00
parent 4c690a20ef
commit 33f5169f36

View file

@ -114,9 +114,13 @@ class TokenUpdateView(
def get_object(self) -> Token: def get_object(self) -> Token:
identifier = self.kwargs.get("identifier") identifier = self.kwargs.get("identifier")
return get_objects_for_user( return (
get_objects_for_user(
self.request.user, self.permission_required, self.model self.request.user, self.permission_required, self.model
).filter(intent=TokenIntents.INTENT_API, identifier=identifier).first() )
.filter(intent=TokenIntents.INTENT_API, identifier=identifier)
.first()
)
class TokenDeleteView(LoginRequiredMixin, PermissionRequiredMixin, DeleteMessageView): class TokenDeleteView(LoginRequiredMixin, PermissionRequiredMixin, DeleteMessageView):
@ -130,6 +134,10 @@ class TokenDeleteView(LoginRequiredMixin, PermissionRequiredMixin, DeleteMessage
def get_object(self) -> Token: def get_object(self) -> Token:
identifier = self.kwargs.get("identifier") identifier = self.kwargs.get("identifier")
return get_objects_for_user( return (
get_objects_for_user(
self.request.user, self.permission_required, self.model self.request.user, self.permission_required, self.model
).filter(intent=TokenIntents.INTENT_API, identifier=identifier).first() )
.filter(intent=TokenIntents.INTENT_API, identifier=identifier)
.first()
)