forked from rDrama/rDrama
master
parent
88b8358880
commit
bc042d59cc
|
@ -208,7 +208,6 @@ class Submission(Base):
|
||||||
if comment: self.__dict__["replies"] = [comment]
|
if comment: self.__dict__["replies"] = [comment]
|
||||||
else: self.__dict__["replies"] = pinned_comment + index.get(self.fullname, [])
|
else: self.__dict__["replies"] = pinned_comment + index.get(self.fullname, [])
|
||||||
|
|
||||||
g.db.commit()
|
|
||||||
return render_template(template,
|
return render_template(template,
|
||||||
v=v,
|
v=v,
|
||||||
p=self,
|
p=self,
|
||||||
|
|
|
@ -496,11 +496,11 @@ class User(Base):
|
||||||
@property
|
@property
|
||||||
@lazy
|
@lazy
|
||||||
def is_suspended(self):
|
def is_suspended(self):
|
||||||
if self.unban_utc and self.unban_utc < time.time():
|
# if self.unban_utc and self.unban_utc < time.time():
|
||||||
self.is_banned = 0
|
# self.is_banned = 0
|
||||||
self.unban_utc = 0
|
# self.unban_utc = 0
|
||||||
g.db.add(self)
|
# g.db.add(self)
|
||||||
g.db.commit()
|
# g.db.commit()
|
||||||
return (self.is_banned and (not self.unban_utc or self.unban_utc > time.time()))
|
return (self.is_banned and (not self.unban_utc or self.unban_utc > time.time()))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue