Browse Source

Fix on the imports in the mongodb migration handler

Roland Haroutiounian 8 years ago
parent
commit
010decc4d3
1 changed files with 4 additions and 2 deletions
  1. 4
    2
      plugins/mongodb_datasource/migration_handler.py

+ 4
- 2
plugins/mongodb_datasource/migration_handler.py View File

@@ -1,8 +1,10 @@
1 1
 # -*- coding: utf-8 -*-
2
+import datetime
3
+
2 4
 from lodel.editorial_model.components import EmClass, EmField
3 5
 
4 6
 from .utils import get_connection_args, mongodbconnect, collection_prefix, object_collection_name
5
-
7
+from lodel.leapi.datahandlers.base_classes import DataHandler
6 8
 
7 9
 class MigrationHandlerChangeError(Exception):
8 10
     pass
@@ -151,7 +153,7 @@ class MongoDbMigrationHandler(object):
151 153
     def _class_collection_name_from_field(self, model, field):
152 154
         class_id = field['class_id']
153 155
         component_class = model.classes(class_id)
154
-        component_collection = utils.object_collection_name(component_class)
156
+        component_collection = object_collection_name(component_class)
155 157
         return component_collection
156 158
 
157 159
 

Loading…
Cancel
Save