gd
This commit is contained in:
parent
ad396f1f29
commit
4d37d38763
2 changed files with 5 additions and 6 deletions
|
@ -208,7 +208,6 @@ class Submission(Base):
|
|||
if comment: self.__dict__["replies"] = [comment]
|
||||
else: self.__dict__["replies"] = pinned_comment + index.get(self.fullname, [])
|
||||
|
||||
g.db.commit()
|
||||
return render_template(template,
|
||||
v=v,
|
||||
p=self,
|
||||
|
|
|
@ -496,11 +496,11 @@ class User(Base):
|
|||
@property
|
||||
@lazy
|
||||
def is_suspended(self):
|
||||
if self.unban_utc and self.unban_utc < time.time():
|
||||
self.is_banned = 0
|
||||
self.unban_utc = 0
|
||||
g.db.add(self)
|
||||
g.db.commit()
|
||||
# if self.unban_utc and self.unban_utc < time.time():
|
||||
# self.is_banned = 0
|
||||
# self.unban_utc = 0
|
||||
# g.db.add(self)
|
||||
# g.db.commit()
|
||||
return (self.is_banned and (not self.unban_utc or self.unban_utc > time.time()))
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue