From 43d4979913bbcab6c911d4f1d9c84220f0444681 Mon Sep 17 00:00:00 2001 From: James Turk Date: Thu, 10 May 2012 11:33:21 -0400 Subject: [PATCH] ObjectId moved to bson --- oyster/web.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/oyster/web.py b/oyster/web.py index 3d183ce..349e872 100644 --- a/oyster/web.py +++ b/oyster/web.py @@ -4,7 +4,7 @@ import datetime import functools import flask -import pymongo.objectid +import bson.objectid from oyster.conf import settings from oyster.core import kernel @@ -14,7 +14,7 @@ class JSONEncoder(json.JSONEncoder): def default(self, obj): if isinstance(obj, datetime.datetime): return obj.isoformat() - elif isinstance(obj, pymongo.objectid.ObjectId): + elif isinstance(obj, bson.objectid.ObjectId): return str(obj) else: return super(JSONEncoder, self).default(obj)