Browse Source

verify Fixed bottle's DB test

Mike Smith 11 years ago
parent
commit
7886db33cb
1 changed files with 2 additions and 2 deletions
  1. 2 2
      bottle/app.py

+ 2 - 2
bottle/app.py

@@ -62,9 +62,9 @@ def get_random_world(db):
 @app.route("/dbs")
 @app.route("/dbs")
 def get_random_world_single(db):
 def get_random_world_single(db):
     wid = randint(1, 10000)
     wid = randint(1, 10000)
-    worlds = [db.query(World).get(wid).serialize]
+    world = db.query(World).get(wid).serialize
     response.content_type = 'application/json'
     response.content_type = 'application/json'
-    return json.dumps(worlds)
+    return json.dumps(world)
   
   
 @app.route("/dbraw")
 @app.route("/dbraw")
 def get_random_world_raw():
 def get_random_world_raw():