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

minor fix for concurrent checkin update #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.py
Expand Up @@ -137,7 +137,7 @@ def api_checkin(sitehash):
mongo.db.kitty.insert(checkin)
else:
checkin['checkins'] = int(checkin['checkins']) + 1
mongo.db.kitty.update({'sitehash': sitehash}, checkin)
mongo.db.kitty.update({'sitehash': sitehash}, {"$inc": {"checkins": 1}})
checkin['error'] = 0
checkin["comments_url"] = '/api/v1/comments/' + sitehash
if checkin.has_key("comments"):
Expand Down