diff --git a/accountant/models/operations.py b/accountant/models/operations.py index 08e3553..5489698 100644 --- a/accountant/models/operations.py +++ b/accountant/models/operations.py @@ -64,23 +64,6 @@ class Operation(db.Model): server_default=db.false() ) - sold = db.column_property( - db.func.sum( - db.case( - whens={canceled: db.text("0")}, - else_=value - ) - ).over( - partition_by=[account_id], - order_by=[ - "operation_date", - db.desc("value"), - db.desc("label"), - id - ] - ).label("sold") - ) - def __init__(self, label, value, account_id, operation_date=None, category=None, pointed=False, confirmed=True, canceled=False, scheduled_operation_id=None):