diff options
| author | Georgios Andreadis <info@gandreadis.com> | 2020-06-18 10:52:00 +0200 |
|---|---|---|
| committer | Georgios Andreadis <info@gandreadis.com> | 2020-06-18 10:52:00 +0200 |
| commit | 4a33ea9d2c82c5fdcd29fc4f54fbb141c673b4d7 (patch) | |
| tree | 48c1e7e2eb2f26f2dfefe45f0327869d5fe988e1 /opendc/util | |
| parent | d4c33e4893528fbd69943981472d00ba232d2ab3 (diff) | |
Fix imports
Diffstat (limited to 'opendc/util')
| -rw-r--r-- | opendc/util/database.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/opendc/util/database.py b/opendc/util/database.py index 9b570d0d..20006ff2 100644 --- a/opendc/util/database.py +++ b/opendc/util/database.py @@ -4,7 +4,7 @@ import sys from datetime import datetime from pymongo import MongoClient from bson.json_util import loads, dumps, RELAXED_JSON_OPTIONS, CANONICAL_JSON_OPTIONS - +import urllib.parse #from mysql.connector.pooling import MySQLConnectionPool @@ -122,7 +122,7 @@ def fetchall(query, collection): results = [] cursor = prefabs_collection.find(query) for doc in cursor: - json_string = dumps(bson) #convert BSON representation to JSON + json_string = dumps(doc) #convert BSON representation to JSON json_obj = json.loads(json_string) #load as a JSON object #leave the id field in for now, we can use it later #json_obj.pop("_id") |
