コード例 #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]
コード例 #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]
コード例 #3
0
 def isShowTimeAvailable(self, showtime):
     allReservations = yield get_reservations_for_showtime(showtime["id"])
     return len(allReservations) < showtime["max_booking"]
コード例 #4
0
 def isShowTimeAvailable(self, showtime):
     allReservations = yield get_reservations_for_showtime(showtime["id"])
     return len(allReservations) < showtime["max_booking"]