forked from MarseyWorld/MarseyWorld
dfdf
parent
e86ac0b757
commit
b6dbb02496
|
@ -194,11 +194,6 @@ class User(Base, Stndrd, Age_times):
|
|||
or_(and_(UserBlock.user_id == self.id, UserBlock.target_id == other.id), and_(
|
||||
UserBlock.user_id == other.id, UserBlock.target_id == self.id))).first()
|
||||
|
||||
def has_blocked_guild(self, board):
|
||||
|
||||
return g.db.query(BoardBlock).filter_by(
|
||||
user_id=self.id, board_id=board.id).first()
|
||||
|
||||
def validate_2fa(self, token):
|
||||
|
||||
x = pyotp.TOTP(self.mfa_secret)
|
||||
|
|
|
@ -161,6 +161,10 @@ def get_posts(pids, v=None):
|
|||
blocking,
|
||||
blocking.c.target_id == Submission.author_id,
|
||||
isouter=True
|
||||
).join(
|
||||
blocked,
|
||||
blocked.c.user_id == Submission.author_id,
|
||||
isouter=True
|
||||
).all()
|
||||
|
||||
output = [p[0] for p in query]
|
||||
|
|
Loading…
Reference in New Issue