Skip to content

Commit

Permalink
Catch RelatedObjectDoesNotExist error
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelm committed Feb 22, 2016
1 parent 14e5134 commit 0fd519d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pretix/presale/views/order.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,9 @@ def positions(self):

@cached_property
def invoice_address(self):
if self.order.invoice_address:
try:
return self.order.invoice_address
else:
except InvoiceAddress.DoesNotExist:
return InvoiceAddress(order=self.order)

@cached_property
Expand Down

0 comments on commit 0fd519d

Please sign in to comment.