[FIX] do not run migration scripts on empty databases
authorChristophe Simonis <chs@openerp.com>
Thu, 12 Sep 2013 18:28:27 +0000 (20:28 +0200)
committerChristophe Simonis <chs@openerp.com>
Thu, 12 Sep 2013 18:28:27 +0000 (20:28 +0200)
bzr revid: chs@openerp.com-20130912182827-iknosbmr7kni7ulo

openerp/modules/migration.py

index 0959533..f199771 100644 (file)
@@ -89,7 +89,7 @@ class MigrationManager(object):
             'post': '[%s>]',
         }
 
-        if not (hasattr(pkg, 'update') or pkg.state == 'to upgrade'):
+        if not (hasattr(pkg, 'update') or pkg.state == 'to upgrade') or pkg.installed_version is None:
             return
 
         def convert_version(version):