From 122cce98a160bf4432fa012eada338a61c58f769 Mon Sep 17 00:00:00 2001 From: Patrick Jentsch <p.jentsch@uni-bielefeld.de> Date: Fri, 24 Feb 2023 09:46:35 +0100 Subject: [PATCH] another small fix --- app/models.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/models.py b/app/models.py index 4f31c570..c71445f9 100644 --- a/app/models.py +++ b/app/models.py @@ -777,8 +777,7 @@ class User(HashidMixin, UserMixin, db.Model): def follow_corpus(self, corpus, role=None): if self.is_following_corpus(corpus): return - if role is None: - r = CorpusFollowerRole.query.filter_by(default=True).first() + r = CorpusFollowerRole.query.filter_by(default=True).first() if role is None else role cfa = CorpusFollowerAssociation(corpus=corpus, role=r, follower=self) db.session.add(cfa) -- GitLab