]> git.parisson.com Git - telemeta-data.git/commitdiff
migration: fix geoethno migrator 'types' stats
authorolivier <olivier@3bf09e05-f825-4182-b9bc-eedd7160adf0>
Mon, 6 Jul 2009 22:54:20 +0000 (22:54 +0000)
committerolivier <olivier@3bf09e05-f825-4182-b9bc-eedd7160adf0>
Mon, 6 Jul 2009 22:54:20 +0000 (22:54 +0000)
git-svn-id: http://svn.parisson.org/svn/crem@116 3bf09e05-f825-4182-b9bc-eedd7160adf0

trunk/import/migration/tasks/geoethno.py

index a3074f0691db2be5024690ec77be962e5ec06b07..f22ac5343264f718418ad95a9a5c930edd6910c3 100644 (file)
@@ -124,6 +124,7 @@ class GeoEthnoImporter(DataMigrator):
             self.cursor.execute("INSERT INTO location_types (id, name) "+
                                 "VALUES (%s, %s)", (id,""))
             self.known_types.append(id)                                
+            self.stats['types'] += 1
 
     def is_empty(self, node):
         for n in node.childNodes:
@@ -180,7 +181,7 @@ class GeoEthnoImporter(DataMigrator):
         self.target("DELETE FROM location_aliases")
         self.target("DELETE FROM location_types")
         self.stats = {
-            'types':            len(self.known_types),
+            'types':            0,
             'locations':        0,
             'relations':        0,
             'aliases':          0,