show how many tickets get deleted when refunding an order
This commit is contained in:
parent
ab180a7c74
commit
3e401f03bc
|
@ -150,7 +150,11 @@ class Order(CreatedUpdatedModel):
|
|||
else:
|
||||
self.refunded=True
|
||||
### delete any tickets related to this order
|
||||
if self.tickets.all():
|
||||
messages.success(request, "Order %s marked as refunded, deleting %s tickets..." % (self.pk, self.tickets.count()))
|
||||
self.tickets.all().delete()
|
||||
else:
|
||||
messages.success(request, "Order %s marked as refunded, no tickets to delete" % self.pk)
|
||||
self.save()
|
||||
|
||||
def is_not_handed_out(self):
|
||||
|
|
Loading…
Reference in a new issue