forked from rDrama/rDrama
remove jc insanity
parent
4551f94aa6
commit
0c91650a1d
|
@ -86,9 +86,10 @@ class Comment(Base):
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return f"<{self.__class__.__name__}(id={self.id})>"
|
return f"<{self.__class__.__name__}(id={self.id})>"
|
||||||
|
|
||||||
|
@property
|
||||||
@lazy
|
@lazy
|
||||||
def top_comment(self, db:scoped_session):
|
def top_comment(self):
|
||||||
return db.get(Comment, self.top_comment_id)
|
return g.db.get(Comment, self.top_comment_id)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@lazy
|
@lazy
|
||||||
|
|
|
@ -153,9 +153,9 @@ def post_id(pid, anything=None, v=None, sub=None):
|
||||||
pin.stickied_utc = None
|
pin.stickied_utc = None
|
||||||
g.db.add(pin)
|
g.db.add(pin)
|
||||||
elif pin.level > 1:
|
elif pin.level > 1:
|
||||||
pinned2[pin.top_comment(g.db)] = ''
|
pinned2[pin.top_comment] = ''
|
||||||
if pin.top_comment(g.db) in comments:
|
if pin.top_comment in comments:
|
||||||
comments.remove(pin.top_comment(g.db))
|
comments.remove(pin.top_comment)
|
||||||
else:
|
else:
|
||||||
pinned2[pin] = ''
|
pinned2[pin] = ''
|
||||||
|
|
||||||
|
|
|
@ -623,7 +623,7 @@ def messagereply(v:User):
|
||||||
|
|
||||||
push_notif({user_id}, title, body, url)
|
push_notif({user_id}, title, body, url)
|
||||||
|
|
||||||
top_comment = c.top_comment(g.db)
|
top_comment = c.top_comment
|
||||||
|
|
||||||
if top_comment.sentto == MODMAIL_ID:
|
if top_comment.sentto == MODMAIL_ID:
|
||||||
admins = g.db.query(User.id).filter(User.admin_level >= PERMS['NOTIFICATIONS_MODMAIL'], User.id != v.id)
|
admins = g.db.query(User.id).filter(User.admin_level >= PERMS['NOTIFICATIONS_MODMAIL'], User.id != v.id)
|
||||||
|
|
Loading…
Reference in New Issue