Permalink
Browse files

Minor comments, adding a TODO

  • Loading branch information...
1 parent 5974c21 commit 5b85216e5d6ed127799f378e38bc45e5078382f0 @ikai committed Jun 11, 2011
Showing with 4 additions and 3 deletions.
  1. +2 −2 db.py
  2. +2 −1 main.py
View
4 db.py
@@ -12,9 +12,9 @@ def get_user(user_id):
def get_or_create_location_by_id(location_id):
"""
Attempts to fetch location data from database. If it doesn't exist,
- create it.
+ create it. Note that this is NOT concurency safe.
"""
- location_data = database.location.find_one({ "_id" : location_id})
+ location_data = database.location.find_one({ "_id" : location_id })
if location_data is None:
location_data = { "_id" : location_id,
"guards": [],
View
@@ -12,6 +12,7 @@
import db
import items
+# TODO: Change to use urllib.urlencode()
CALLBACK_URL = urllib.quote(config.REDIRECT_URL + "/callback")
LOGIN_URL = "https://www.facebook.com/dialog/oauth?client_id=%s&redirect_uri=%s&scope=email,user_checkins,publish_checkins,manage_friendlists" % (config.FACEBOOK_APPLICATION_ID, CALLBACK_URL)
ACCESS_TOKEN_URL_TPL = "https://graph.facebook.com/oauth/access_token?client_id=" + config.FACEBOOK_APPLICATION_ID \
@@ -254,7 +255,7 @@ def get(self):
"""
user_id = self.get_secure_cookie("user_id")
user = db.get_user(user_id)
- inventory = self.get_inventory_for_user(user)
+ inventory = db.get_inventory_for_user(user)
self.render("templates/store.html",
inventory=inventory,

0 comments on commit 5b85216

Please sign in to comment.