Пример #1
0
def validate_view_category_items(category):
    list_of_restaurant_categories_items = ViewDB.get_categories_fooditems(
        category)
    if (len(list_of_restaurant_categories_items) == 0):
        raise CustomException2.InvalidCatItemsException

    return list_of_restaurant_categories_items
Пример #2
0
def validate_view_category_items(category, restaurant):

    list_of_restaurant_categories_items = ViewDB.get_categories_fooditems(
        restaurant, category)
    if (len(list_of_restaurant_categories_items) == 0):
        #return False
        raise InvalidCatItemsException
    return list_of_restaurant_categories_items