Fixed a bug that lead to invoice information not being editable if

nothing else is editable in an order
This commit is contained in:
Raphael Michel
2016-08-14 16:10:06 +02:00
parent d8a84e762f
commit 6d54239b47

View File

@@ -218,10 +218,13 @@ class Order(LoggedModel):
modify_deadline = self.event.settings.get('last_order_modification_date', as_type=datetime)
if modify_deadline is not None and now() > modify_deadline:
return False
if self.event.settings.get('invoice_address_asked', as_type=bool):
return True
ask_names = self.event.settings.get('attendee_names_asked', as_type=bool)
for cp in self.positions.all().prefetch_related('item__questions'):
if (cp.item.admission and ask_names) or cp.item.questions.all():
return True
return False # nothing there to modify
@property