summaryrefslogtreecommitdiff
path: root/bin/addons/base/module/module.py
diff options
context:
space:
mode:
authorChristophe Simonis <christophe@taupe>2008-12-26 11:14:34 +0100
committerChristophe Simonis <christophe@taupe>2008-12-26 11:14:34 +0100
commit00067b2e13b43d10b9524f429f6dfb8defd217aa (patch)
tree9569e304c22e36c13056976906a9dd880c4fbf4d /bin/addons/base/module/module.py
parentba68f9bdb1d97620107ead4d0700a5743b35a636 (diff)
[FIX] modules: no version specify mean version '0'
bzr revid: christophe@taupe-20081226101434-9qnhitt14kkxeu4i
Diffstat (limited to 'bin/addons/base/module/module.py')
-rw-r--r--bin/addons/base/module/module.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/addons/base/module/module.py b/bin/addons/base/module/module.py
index f2541a17791..01917e9ab7e 100644
--- a/bin/addons/base/module/module.py
+++ b/bin/addons/base/module/module.py
@@ -346,7 +346,7 @@ class module(osv.osv):
mod_sort = {}
for m in modules:
name, version, extension = m[0], m[1], m[-1]
- if version == 'x': # 'x' version was a mistake
+ if not version or version == 'x': # 'x' version was a mistake
version = '0'
if name in mod_sort:
if parse_version(version) <= parse_version(mod_sort[name][0]):
@@ -367,7 +367,7 @@ class module(osv.osv):
else:
id = ids[0]
installed_version = self.read(cr, uid, id, ['latest_version'])['latest_version']
- if installed_version == 'x': # 'x' version was a mistake
+ if not installed_version or installed_version == 'x': # 'x' version was a mistake
installed_version = '0'
if parse_version(version) > parse_version(installed_version):
self.write(cr, uid, id, { 'url': url })