From 3431fb89ca90eabb163b346c9f969e057dbcdd3f Mon Sep 17 00:00:00 2001
From: Harsha Kethineni <harshakethineni@flywheel.io>
Date: Wed, 1 Nov 2017 11:42:28 -0500
Subject: [PATCH] bson.InvalidId -> bson.errors.InvalidId

---
 api/dao/base.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/api/dao/base.py b/api/dao/base.py
index f61254d9..3e0a9386 100644
--- a/api/dao/base.py
+++ b/api/dao/base.py
@@ -155,7 +155,7 @@ class ContainerStorage(object):
         if self.use_object_id:
             try:
                 _id = bson.ObjectId(_id)
-            except bson.InvalidId as e:
+            except bson.errors.InvalidId as e:
                 raise APIStorageException(e.message)
         if recursive and r_payload is not None:
             containerutil.propagate_changes(self.cont_name, _id, {}, {'$set': util.mongo_dict(r_payload)})
@@ -165,7 +165,7 @@ class ContainerStorage(object):
         if self.use_object_id:
             try:
                 _id = bson.ObjectId(_id)
-            except bson.InvalidId as e:
+            except bson.errors.InvalidId as e:
                 raise APIStorageException(e.message)
         return self.dbc.delete_one({'_id':_id})
 
@@ -173,7 +173,7 @@ class ContainerStorage(object):
         if self.use_object_id:
             try:
                 _id = bson.ObjectId(_id)
-            except bson.InvalidId as e:
+            except bson.errors.InvalidId as e:
                 raise APIStorageException(e.message)
         cont = self._from_mongo(self.dbc.find_one(_id, projection))
         if fill_defaults:
-- 
GitLab