Merge pull request #4557 from FinnStutzenstein/removeUnnecessaryView

Remove unnecessary view (fixed #4549)
This commit is contained in:
Norman Jäckel 2019-04-05 12:44:36 +02:00 committed by GitHub
commit aa9af9db8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,13 +47,7 @@ class ItemViewSet(
result = has_perm(self.request.user, "agenda.can_see")
# For manage_speaker and tree requests the rest of the check is
# done in the specific method. See below.
elif self.action in (
"partial_update",
"update",
"sort",
"sort_whole",
"assign",
):
elif self.action in ("partial_update", "update", "sort", "assign"):
result = (
has_perm(self.request.user, "agenda.can_see")
and has_perm(self.request.user, "agenda.can_see_internal_items")
@ -343,21 +337,6 @@ class ItemViewSet(
"""
return self.sort_tree(request, Item, "weight", "parent_id")
@list_route(methods=["post"])
def sort_whole(self, request):
"""
Sorts the whole agenda represented in a tree of ids. The request data should be a list (the root)
of all main agenda items. Each node is a dict with an id and optional all children:
{
id: <the id>
children: [
<children, optional>
]
}
Every id has to be given.
"""
return self.sort_tree(request, Item, "weight", "parent_id")
@list_route(methods=["post"])
@transaction.atomic
def assign(self, request):