def get_incomes(): schema = IncomeSchema(many=True) incomes = schema.dump(Income.query.all()) return incomes.data
def get_incomes(): schema = IncomeSchema(many=True) incomes = schema.dump( filter(lambda t: t.type == TransactionType.INCOME, transactions) ) return jsonify(incomes.data)