dfdf
This commit is contained in:
parent
d111d07d9e
commit
01303fb7cc
2 changed files with 4 additions and 5 deletions
|
@ -194,11 +194,6 @@ class User(Base, Stndrd, Age_times):
|
||||||
or_(and_(UserBlock.user_id == self.id, UserBlock.target_id == other.id), and_(
|
or_(and_(UserBlock.user_id == self.id, UserBlock.target_id == other.id), and_(
|
||||||
UserBlock.user_id == other.id, UserBlock.target_id == self.id))).first()
|
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):
|
def validate_2fa(self, token):
|
||||||
|
|
||||||
x = pyotp.TOTP(self.mfa_secret)
|
x = pyotp.TOTP(self.mfa_secret)
|
||||||
|
|
|
@ -161,6 +161,10 @@ def get_posts(pids, v=None):
|
||||||
blocking,
|
blocking,
|
||||||
blocking.c.target_id == Submission.author_id,
|
blocking.c.target_id == Submission.author_id,
|
||||||
isouter=True
|
isouter=True
|
||||||
|
).join(
|
||||||
|
blocked,
|
||||||
|
blocked.c.user_id == Submission.author_id,
|
||||||
|
isouter=True
|
||||||
).all()
|
).all()
|
||||||
|
|
||||||
output = [p[0] for p in query]
|
output = [p[0] for p in query]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue