def get_all(): models = Category.get_all_models_with_img(throw=True) for model in models: model._fields = ['id', 'name'] return models