fdssfd
This commit is contained in:
parent
5d2f5a037d
commit
4a2c67ab2d
3 changed files with 9 additions and 5 deletions
|
@ -26,8 +26,9 @@ SITE_NAME = environ.get("SITE_NAME", "").strip()
|
||||||
def justice(v):
|
def justice(v):
|
||||||
for id in [261,1832,1833]:
|
for id in [261,1832,1833]:
|
||||||
u = g.db.query(User).options(lazyload('*')).filter_by(id = id).first()
|
u = g.db.query(User).options(lazyload('*')).filter_by(id = id).first()
|
||||||
u.comment_count = g.db.query(Comment).options(lazyload('*')).filter_by(author_id = id).count()
|
if u:
|
||||||
g.db.add(u)
|
u.comment_count = g.db.query(Comment).options(lazyload('*')).filter_by(author_id = id).count()
|
||||||
|
g.db.add(u)
|
||||||
g.db.commit()
|
g.db.commit()
|
||||||
return "sex"
|
return "sex"
|
||||||
|
|
||||||
|
|
|
@ -415,7 +415,8 @@ def api_comment(v):
|
||||||
|
|
||||||
g.db.add(c2)
|
g.db.add(c2)
|
||||||
|
|
||||||
longpostbot = g.db.query(User).options(lazyload('*')).filter_by(id = LONGPOSTBOT_ACCOUNT).first().comment_count += 1
|
longpostbot = g.db.query(User).options(lazyload('*')).filter_by(id = LONGPOSTBOT_ACCOUNT).first()
|
||||||
|
longpostbot.comment_count += 1
|
||||||
g.db.add(longpostbot)
|
g.db.add(longpostbot)
|
||||||
|
|
||||||
g.db.flush()
|
g.db.flush()
|
||||||
|
@ -501,7 +502,8 @@ def api_comment(v):
|
||||||
|
|
||||||
g.db.add(c4)
|
g.db.add(c4)
|
||||||
|
|
||||||
zozbot = g.db.query(User).options(lazyload('*')).filter_by(id = ZOZBOT_ACCOUNT).first().comment_count += 3
|
zozbot = g.db.query(User).options(lazyload('*')).filter_by(id = ZOZBOT_ACCOUNT).first()
|
||||||
|
zozbot.comment_count += 3
|
||||||
g.db.add(zozbot)
|
g.db.add(zozbot)
|
||||||
|
|
||||||
g.db.flush()
|
g.db.flush()
|
||||||
|
|
|
@ -904,7 +904,8 @@ def submit_post(v):
|
||||||
|
|
||||||
g.db.add(c)
|
g.db.add(c)
|
||||||
|
|
||||||
snappy = g.db.query(User).options(lazyload('*')).filter_by(id = SNAPPY_ACCOUNT).first().comment_count += 1
|
snappy = g.db.query(User).options(lazyload('*')).filter_by(id = SNAPPY_ACCOUNT).first()
|
||||||
|
snappy.comment_count += 1
|
||||||
g.db.add(snappy)
|
g.db.add(snappy)
|
||||||
|
|
||||||
g.db.flush()
|
g.db.flush()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue