mamimoluo

修正删除回帖无法没有更新回帖统计的bug

  •  
  •   mamimoluo · Dec 21, 2010 · 3988 views
    This topic created in 5621 days ago, the information mentioned may be changed or developed.
    操作:添加
    文件:/backstage.py

    BackstageRemoveReplyHandler类

    在“memcache.delete('Topic_' + str(topic.num))”上一行添加:
    q3 = db.GqlQuery('SELECT * FROM Counter WHERE name = :1', 'reply.total')
    if q3.count() == 1:
    counter = q3[0]
    counter.value = counter.value - 1
    counter.put()

    注意代码缩进
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3278 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 14:09 · PVG 22:09 · LAX 07:09 · JFK 10:09
    ♥ Do have faith in what you're doing.