From ff3ac3658fd22c3b27da0c9c8843944f14728d5e Mon Sep 17 00:00:00 2001 From: Patrick Jentsch <p.jentsch@uni-bielefeld.de> Date: Fri, 24 Feb 2023 10:02:28 +0100 Subject: [PATCH] Yet another small fix --- app/models.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/models.py b/app/models.py index c71445f9..d73b01b6 100644 --- a/app/models.py +++ b/app/models.py @@ -542,7 +542,8 @@ class User(HashidMixin, UserMixin, db.Model): ) followed_corpora = association_proxy( 'corpus_follower_associations', - 'corpus' + 'corpus', + creator=lambda c: CorpusFollowerAssociation(corpus=c) ) jobs = db.relationship( 'Job', @@ -1499,7 +1500,8 @@ class Corpus(HashidMixin, db.Model): ) followers = association_proxy( 'corpus_follower_associations', - 'follower' + 'follower', + creator=lambda u: CorpusFollowerAssociation(follower=u) ) user = db.relationship('User', back_populates='corpora') # "static" attributes -- GitLab