Skip to content
Snippets Groups Projects
Verified Commit 14b4137f authored by Tom Teichler's avatar Tom Teichler :beers:
Browse files

Fix voucher creation

parent 8d732305
No related branches found
No related tags found
No related merge requests found
...@@ -346,7 +346,6 @@ def create_voucher(request): ...@@ -346,7 +346,6 @@ def create_voucher(request):
create_voucher_form = VoucherCreationForm() create_voucher_form = VoucherCreationForm()
current_person = TeckidsPerson.objects.get(uid=request.user.username) current_person = TeckidsPerson.objects.get(uid=request.user.username)
code = generate_code()
# Check whether person is a member of team-orga or supraadmin. # Check whether person is a member of team-orga or supraadmin.
if not current_person.is_orga and not current_person.is_supraadmin and not current_person.is_board: if not current_person.is_orga and not current_person.is_supraadmin and not current_person.is_board:
...@@ -373,7 +372,7 @@ def create_voucher(request): ...@@ -373,7 +372,7 @@ def create_voucher(request):
message.body = _("""Ein Voucher für die Veranstaltung %s wurde erstellt. message.body = _("""Ein Voucher für die Veranstaltung %s wurde erstellt.
Person für welche der Rabatt ausgestellt wurde: %s Person für welche der Rabatt ausgestellt wurde: %s
Rabattwert: %s Rabattwert: %s
Rabattcode: %s """) % (create_voucher_form.cleaned_data['project_cn'], create_voucher_form.cleaned_data['person_uid'], create_voucher_form.cleaned_data['discount'], code) Rabattcode: %s """) % (create_voucher_form.cleaned_data['project_cn'], create_voucher_form.cleaned_data['person_uid'], create_voucher_form.cleaned_data['discount'], create_voucher.code)
# Send message # Send message
message.send() message.send()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment