Skip to content
Snippets Groups Projects
Commit 122cce98 authored by Patrick Jentsch's avatar Patrick Jentsch
Browse files

another small fix

parent cb31afe7
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment