mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-25 19:04:18 +00:00
another small fix
This commit is contained in:
parent
cb31afe723
commit
122cce98a1
@ -777,8 +777,7 @@ class User(HashidMixin, UserMixin, db.Model):
|
|||||||
def follow_corpus(self, corpus, role=None):
|
def follow_corpus(self, corpus, role=None):
|
||||||
if self.is_following_corpus(corpus):
|
if self.is_following_corpus(corpus):
|
||||||
return
|
return
|
||||||
if role is None:
|
r = CorpusFollowerRole.query.filter_by(default=True).first() if role is None else role
|
||||||
r = CorpusFollowerRole.query.filter_by(default=True).first()
|
|
||||||
cfa = CorpusFollowerAssociation(corpus=corpus, role=r, follower=self)
|
cfa = CorpusFollowerAssociation(corpus=corpus, role=r, follower=self)
|
||||||
db.session.add(cfa)
|
db.session.add(cfa)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user