Simplifies invoice-getting documentation.
This commit is contained in:
parent
9f72b67510
commit
67b047e7b3
1 changed files with 1 additions and 4 deletions
|
@ -32,10 +32,7 @@ Our the ``demopay`` view from the ``registrasion-demo`` project implements pre-v
|
||||||
from registrasion.controllers.invoice import InvoiceController
|
from registrasion.controllers.invoice import InvoiceController
|
||||||
from django.core.exceptions import ValidationError
|
from django.core.exceptions import ValidationError
|
||||||
|
|
||||||
# Get the Registrasion Invoice model
|
invoice = InvoiceController.for_id_or_404(invoice.id)
|
||||||
inv = get_object_or_404(rego.Invoice.objects, pk=invoice_id)
|
|
||||||
|
|
||||||
invoice = InvoiceController(inv)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
invoice.validate_allowed_to_pay() # Verify that we're allowed to do this.
|
invoice.validate_allowed_to_pay() # Verify that we're allowed to do this.
|
||||||
|
|
Loading…
Reference in a new issue