mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-02-02 16:21:32 -08:00
join topic bugfix
This commit is contained in:
parent
ff42ae3f1f
commit
dc87bafaaa
1 changed files with 1 additions and 1 deletions
|
@ -374,7 +374,7 @@ class Community(db.Model):
|
|||
|
||||
def user_is_banned(self, user):
|
||||
membership = CommunityMember.query.filter(CommunityMember.community_id == self.id, CommunityMember.user_id == user.id).first()
|
||||
if membership.is_banned:
|
||||
if membership and membership.is_banned:
|
||||
return True
|
||||
banned = CommunityBan.query.filter(CommunityBan.community_id == self.id, CommunityBan.user_id == user.id).first()
|
||||
if banned:
|
||||
|
|
Loading…
Add table
Reference in a new issue