core: fix error during migrations

This commit is contained in:
Jens Langhammer 2020-12-25 23:45:28 +01:00
parent 6a5a243dac
commit 3ac3a8eebe
3 changed files with 5 additions and 2 deletions

View File

@ -34,9 +34,12 @@ class UserSerializer(ModelSerializer):
class UserViewSet(ModelViewSet):
"""User Viewset"""
queryset = User.objects.all().exclude(pk=get_anonymous_user().pk)
queryset = User.objects.all()
serializer_class = UserSerializer
def get_queryset(self):
return User.objects.all().exclude(pk=get_anonymous_user().pk)
@swagger_auto_schema(responses={200: UserSerializer(many=False)})
@action(detail=False)
# pylint: disable=invalid-name

View File

@ -1,6 +1,5 @@
"""authentik flows invitation forms"""
from django import forms
from django.utils.translation import gettext as _
from authentik.admin.fields import CodeMirrorWidget, YAMLField
from authentik.stages.invitation.models import Invitation, InvitationStage

View File

@ -8636,6 +8636,7 @@ definitions:
x-nullable: true
fixed_data:
title: Fixed data
description: Optional fixed data to enforce on user enrollment.
type: object
OTPStaticStage:
description: OTPStaticStage Serializer