Changes between Initial Version and Version 2 of Ticket #29786


Ignore:
Timestamp:
Sep 23, 2018, 3:35:53 AM (6 years ago)
Author:
ovalseven8
Comment:

Add decorator

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #29786 – Description

    initial v2  
    1010    def get_number_of_registered_tickets():
    1111        return EventRegistration.objects.filter(event__exact=self).aggregate(total=Coalesce(Sum('number_tickets'), 0))['total']
    12 
     12   
     13    @transaction.atomic
    1314    def reserve_tickets(self, number_tickets):
    1415        Event.objects.filter(id=self.id).select_for_update()
Back to Top