def validate_search_as_all(city, area, rating_lower, rating_upper, var1): list_of_search_categories = searchdb.search_as_all(city, area, rating_lower, rating_upper, var1) if (len(list_of_search_categories) == 0): raise CustomException2.Invalidfilter() return list_of_search_categories
def validate_view_category(restaurant_type): list_of_restaurant_categories = ViewDB.get_restaurant_categories( restaurant_type) if (len(list_of_restaurant_categories) == 0): raise CustomException2.InvalidCategoryException() return list_of_restaurant_categories
def validate_highest_rated(): list_of_search_categories = searchdb.search_highest_rated() if (len(list_of_search_categories) == 0): raise CustomException2.Invalidfilter() return list_of_search_categories
def validate_hotel_name(city, area, restaurant_name): list_of_search_categories = searchdb.hotel_name(city, area, restaurant_name) if (len(list_of_search_categories) == 0): raise CustomException2.Invalidfilter() return list_of_search_categories
def validate_search_as_dislike_like_type(city, area, var1): list_of_search_categories = searchdb.search_as_dislike_like_type( city, area, var1) if (len(list_of_search_categories) == 0): raise CustomException2.Invalidfilter() return list_of_search_categories
def validate_search_as_likes(city, area): list_of_search_categories = searchdb.search_as_likes(city, area) if (len(list_of_search_categories) == 0): print("noooooooo") raise CustomException2.Invalidfilter() return list_of_search_categories
def validate_search_category(city, area): list_of_search_categories = searchdb.search_as_a_guest(city, area) if (len(list_of_search_categories) == 0): raise CustomException2.Invalidcityareaname() return list_of_search_categories
def validate_city_wise_highest_booked(city): list_of_search_categories = searchdb.city_wise_highest_booked(city) if (len(list_of_search_categories) == 0): raise CustomException2.Invalidfilter() return list_of_search_categories