core: fix error during migrations

This commit is contained in:
Jens Langhammer 2020-12-25 23:45:28 +01:00
parent 49636f8fa0
commit 4e20cd0fee
3 changed files with 4 additions and 1 deletions

View File

@ -36,6 +36,9 @@ class UserViewSet(ModelViewSet):
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

@ -8595,6 +8595,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