Ejemplo n.º 1
0
 def isShowTimeAvailable(self, showtime, is_shitty=False):
     allReservations = yield get_reservations_for_showtime(showtime["id"])
     if is_shitty:
         fieldName = "max_shitty_booking"
         good = list(filter(lambda x: x['is_shitty'] == True, allReservations))
     else:
         fieldName = "max_normal_booking"
         good = list(filter(lambda x: x['is_shitty'] == False, allReservations))
     return len(good) < showtime[fieldName]
Ejemplo n.º 2
0
 def isShowTimeAvailable(self, showtime, is_shitty=False):
     allReservations = yield get_reservations_for_showtime(showtime["id"])
     if is_shitty:
         fieldName = "max_shitty_booking"
         good = list(
             filter(lambda x: x['is_shitty'] == True, allReservations))
     else:
         fieldName = "max_normal_booking"
         good = list(
             filter(lambda x: x['is_shitty'] == False, allReservations))
     return len(good) < showtime[fieldName]
Ejemplo n.º 3
0
 def isShowTimeAvailable(self, showtime):
     allReservations = yield get_reservations_for_showtime(showtime["id"])
     return len(allReservations) < showtime["max_booking"]
Ejemplo n.º 4
0
 def isShowTimeAvailable(self, showtime):
     allReservations = yield get_reservations_for_showtime(showtime["id"])
     return len(allReservations) < showtime["max_booking"]