Fixed application and assigment ballot paper: don't use old profile object.
This commit is contained in:
parent
12d8527255
commit
1548479069
@ -833,9 +833,9 @@ class ApplicationPollPDF(PDFView):
|
|||||||
|
|
||||||
# set number of ballot papers
|
# set number of ballot papers
|
||||||
if ballot_papers_selection == "NUMBER_OF_DELEGATES":
|
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":
|
elif ballot_papers_selection == "NUMBER_OF_ALL_PARTICIPANTS":
|
||||||
number = int(Profile.objects.count())
|
number = int(User.objects.count())
|
||||||
else: # ballot_papers_selection == "CUSTOM_NUMBER"
|
else: # ballot_papers_selection == "CUSTOM_NUMBER"
|
||||||
number = int(ballot_papers_number)
|
number = int(ballot_papers_number)
|
||||||
number = max(1, number)
|
number = max(1, number)
|
||||||
|
@ -554,9 +554,9 @@ class AssignmentPollPDF(PDFView):
|
|||||||
|
|
||||||
# set number of ballot papers
|
# set number of ballot papers
|
||||||
if ballot_papers_selection == "NUMBER_OF_DELEGATES":
|
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":
|
elif ballot_papers_selection == "NUMBER_OF_ALL_PARTICIPANTS":
|
||||||
number = int(Profile.objects.count())
|
number = int(User.objects.count())
|
||||||
else: # ballot_papers_selection == "CUSTOM_NUMBER"
|
else: # ballot_papers_selection == "CUSTOM_NUMBER"
|
||||||
number = int(ballot_papers_number)
|
number = int(ballot_papers_number)
|
||||||
number = max(1, number)
|
number = max(1, number)
|
||||||
|
Loading…
Reference in New Issue
Block a user