diff --git a/openslides/application/views.py b/openslides/application/views.py index 87eca0f1a..5b8e3dcce 100644 --- a/openslides/application/views.py +++ b/openslides/application/views.py @@ -833,9 +833,9 @@ class ApplicationPollPDF(PDFView): # set number of ballot papers if ballot_papers_selection == "NUMBER_OF_DELEGATES": - number = User.objects.filter(profile__type__iexact="delegate").count() + number = User.objects.filter(type__iexact="delegate").count() elif ballot_papers_selection == "NUMBER_OF_ALL_PARTICIPANTS": - number = int(Profile.objects.count()) + number = int(User.objects.count()) else: # ballot_papers_selection == "CUSTOM_NUMBER" number = int(ballot_papers_number) number = max(1, number) diff --git a/openslides/assignment/views.py b/openslides/assignment/views.py index 832af4cea..68f561c87 100644 --- a/openslides/assignment/views.py +++ b/openslides/assignment/views.py @@ -554,9 +554,9 @@ class AssignmentPollPDF(PDFView): # set number of ballot papers if ballot_papers_selection == "NUMBER_OF_DELEGATES": - number = User.objects.filter(profile__type__iexact="delegate").count() + number = User.objects.filter(type__iexact="delegate").count() elif ballot_papers_selection == "NUMBER_OF_ALL_PARTICIPANTS": - number = int(Profile.objects.count()) + number = int(User.objects.count()) else: # ballot_papers_selection == "CUSTOM_NUMBER" number = int(ballot_papers_number) number = max(1, number)