core: fix formatting

This commit is contained in:
Jens Langhammer 2020-12-26 15:28:29 +01:00
parent 4c690a20ef
commit 33f5169f36
1 changed files with 14 additions and 6 deletions

View File

@ -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()
)