Browse Source

PR611 Fixed output for DB and QUERY

The results are not perfectly formatted, but they are good enough
for now.
Mike Smith 11 years ago
parent
commit
9532f50113
1 changed files with 2 additions and 2 deletions
  1. 2 2
      tornado/server.py

+ 2 - 2
tornado/server.py

@@ -41,14 +41,14 @@ class QueryTestHandler(BaseHandler):
 
         if queries == 0:
             random_id = random.randint(1, 10000)
-            world = yield motor.Op(db.world.find_one,{"id": random_id}, fields={"_id": 0, "id": 1, "randomNumber": 1})
+            world = yield motor.Op(db.World.find_one,{"_id": random_id}, fields={"_id": 1, "randomNumber": 1})
             # Get first postion on arguments, and so first postion in mongo return
             response = json.dumps(world)
         else:
             worlds = []
             for i in xrange(int(queries)):
                 random_id = random.randint(1, 10000)
-                world = yield motor.Op(db.world.find_one,{"id": random_id}, fields={"_id": 0, "id": 1, "randomNumber": 1})
+                world = yield motor.Op(db.World.find_one,{"_id": random_id}, fields={"_id": 1, "randomNumber": 1})
                 # Get first postion on arguments, and so first postion in mongo return
                 worlds.append(world)
             response = json.dumps(worlds)