Change backrefs.

This commit is contained in:
Alexis Lahouze 2015-08-21 00:02:40 +02:00
parent fbefe633f2
commit 25885ff3ea

View File

@ -42,13 +42,13 @@ class Operation(db.Model):
) )
scheduled_operation = db.relationship( scheduled_operation = db.relationship(
"ScheduledOperation", backref=db.backref('entry', lazy="dynamic") "ScheduledOperation", backref=db.backref('operations', lazy="dynamic")
) )
account_id = db.Column(db.Integer, db.ForeignKey('account.id'), index=True) account_id = db.Column(db.Integer, db.ForeignKey('account.id'), index=True)
account = db.relationship( account = db.relationship(
'Account', backref=db.backref('operation', lazy="dynamic") 'Account', backref=db.backref('operations', lazy="dynamic")
) )
category = db.Column(db.String(100), nullable=True, index=True) category = db.Column(db.String(100), nullable=True, index=True)