From: olivier Date: Mon, 6 Jul 2009 22:54:20 +0000 (+0000) Subject: migration: fix geoethno migrator 'types' stats X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=1d3d491ec1a522e48ea6a14a9b3a20213124ca1e;p=telemeta-data.git migration: fix geoethno migrator 'types' stats git-svn-id: http://svn.parisson.org/svn/crem@116 3bf09e05-f825-4182-b9bc-eedd7160adf0 --- diff --git a/trunk/import/migration/tasks/geoethno.py b/trunk/import/migration/tasks/geoethno.py index a3074f0..f22ac53 100644 --- a/trunk/import/migration/tasks/geoethno.py +++ b/trunk/import/migration/tasks/geoethno.py @@ -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,