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]
 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]
 def isShowTimeAvailable(self, showtime):
     allReservations = yield get_reservations_for_showtime(showtime["id"])
     return len(allReservations) < showtime["max_booking"]
 def isShowTimeAvailable(self, showtime):
     allReservations = yield get_reservations_for_showtime(showtime["id"])
     return len(allReservations) < showtime["max_booking"]