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_view_category(restaurant_type): # print("///////////////////validate_view_category////////////////////") # print("In validate function class /validate_view_category") # print("In validate function class /validate_view_category") list_of_restaurant_categories = ViewDB.get_restaurant_categories( restaurant_type) if (len(list_of_restaurant_categories) == 0): #print("Raising Exception") raise InvalidCategoryException() return list_of_restaurant_categories