dffsd
This commit is contained in:
parent
5e8a522310
commit
310c40e524
3 changed files with 6 additions and 2 deletions
|
@ -40,7 +40,7 @@ class Comment(Base):
|
|||
notifiedto=Column(Integer)
|
||||
app_id = Column(Integer, ForeignKey("oauth_apps.id"))
|
||||
oauth_app = relationship("OauthApp", viewonly=True)
|
||||
upvotes = Column(Integer, default=0)
|
||||
upvotes = Column(Integer, default=1)
|
||||
downvotes = Column(Integer, default=0)
|
||||
body = deferred(Column(String))
|
||||
body_html = deferred(Column(String))
|
||||
|
|
|
@ -280,7 +280,8 @@ def api_comment(v):
|
|||
parent_submission=parent_submission,
|
||||
parent_comment_id=c.id,
|
||||
level=level+1,
|
||||
body_html=filter_title(option)
|
||||
body_html=filter_title(option),
|
||||
upvotes=0
|
||||
)
|
||||
|
||||
g.db.add(c_option)
|
||||
|
@ -417,6 +418,7 @@ def api_comment(v):
|
|||
|
||||
longpostbot = g.db.query(User).options(lazyload('*')).filter_by(id = LONGPOSTBOT_ACCOUNT).first()
|
||||
longpostbot.comment_count += 1
|
||||
longpostbot.coins += 1
|
||||
g.db.add(longpostbot)
|
||||
|
||||
g.db.flush()
|
||||
|
|
|
@ -711,6 +711,7 @@ def submit_post(v):
|
|||
parent_submission=new_post.id,
|
||||
level=1,
|
||||
body_html=filter_title(option),
|
||||
upvotes=0
|
||||
)
|
||||
|
||||
g.db.add(c)
|
||||
|
@ -906,6 +907,7 @@ def submit_post(v):
|
|||
|
||||
snappy = g.db.query(User).options(lazyload('*')).filter_by(id = SNAPPY_ACCOUNT).first()
|
||||
snappy.comment_count += 1
|
||||
snappy.coins += 1
|
||||
g.db.add(snappy)
|
||||
|
||||
g.db.flush()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue