Navigation Menu

Skip to content
This repository has been archived by the owner on Sep 19, 2021. It is now read-only.

Commit

Permalink
minor fix for concurrent checkin update
Browse files Browse the repository at this point in the history
  • Loading branch information
rosolovskiy committed Aug 20, 2012
1 parent a366382 commit 7929a49
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.py
Expand Up @@ -136,8 +136,8 @@ def api_checkin(sitehash):
checkin = get_default_checkin(sitehash)
mongo.db.kitty.insert(checkin)
else:
checkin['checkins'] = int(checkin['checkins']) + 1
mongo.db.kitty.update({'sitehash': sitehash}, checkin)
checkin_inc = {"$inc": {"checkins": 1}}
mongo.db.kitty.update({'sitehash': sitehash}, checkin_inc)
checkin['error'] = 0
checkin["comments_url"] = '/api/v1/comments/' + sitehash
if checkin.has_key("comments"):
Expand Down

0 comments on commit 7929a49

Please sign in to comment.