From cf7e293a1cb5012795e715fa9ef88dbca9bfc276 Mon Sep 17 00:00:00 2001 From: chapeau Date: Tue, 21 Apr 2020 17:19:16 +0200 Subject: [PATCH] Fix of copy/paste errors --- machines/api/serializers.py | 6 +++--- users/api/urls.py | 2 +- users/api/views.py | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/machines/api/serializers.py b/machines/api/serializers.py index eeebb062..9231a995 100644 --- a/machines/api/serializers.py +++ b/machines/api/serializers.py @@ -107,12 +107,12 @@ class SOASerializer(NamespacedHMSerializer): class ExtensionSerializer(NamespacedHMSerializer): - """Serialize `machines.models.Extension` objects. + """Serialize machines.models.Extension objects. """ class Meta: - model = machines.Domain - fields = ("interface_parent", "name", "extension", "cname", "api_url", "ttl") + model = machines.Extension + fields = ("name", "need_infra", "origin", "origin_v6", "soa", "api_url") class MxSerializer(NamespacedHMSerializer): diff --git a/users/api/urls.py b/users/api/urls.py index 027793d3..ef2b01b1 100644 --- a/users/api/urls.py +++ b/users/api/urls.py @@ -31,7 +31,7 @@ urls_viewset = [ (r"users/serviceuser", views.ServiceUserViewSet, None), (r"users/school", views.SchoolViewSet, None), (r"users/listright", views.ListRightViewSet, None), - (r"users/shell", views.ShellViewSet, None), + (r"users/shell", views.ShellViewSet, "shell"), (r"users/ban", views.BanViewSet, None), (r"users/whitelist", views.WhitelistViewSet, None), (r"users/emailaddress", views.EMailAddressViewSet, None) diff --git a/users/api/views.py b/users/api/views.py index 8a1a1280..57571f70 100644 --- a/users/api/views.py +++ b/users/api/views.py @@ -21,6 +21,7 @@ from rest_framework import viewsets, generics, views from django.db.models import Q +from django.contrib.auth.models import Group from . import serializers from api.pagination import PageSizedPagination