mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
better instance.online() logic
This commit is contained in:
parent
9ec7f969be
commit
fea7de022f
1 changed files with 1 additions and 1 deletions
|
@ -75,7 +75,7 @@ class Instance(db.Model):
|
|||
communities = db.relationship('Community', backref='instance', lazy='dynamic')
|
||||
|
||||
def online(self):
|
||||
return not self.dormant and not self.gone_forever
|
||||
return not (self.dormant or self.gone_forever)
|
||||
|
||||
def user_is_admin(self, user_id):
|
||||
role = InstanceRole.query.filter_by(instance_id=self.id, user_id=user_id).first()
|
||||
|
|
Loading…
Add table
Reference in a new issue