Skip to content
Snippets Groups Projects
Commit 4227b76e authored by Christophe Simonis's avatar Christophe Simonis
Browse files

[FIX] core: ensure `odoo.upgrade` __path__ contains real directories


mimic what is done for `odoo.addons` __path__.

closes odoo/odoo#121136

X-original-commit: 2a981e6a
Signed-off-by: default avatarChristophe Simonis <chs@odoo.com>
parent e4d1a9e0
No related branches found
No related tags found
No related merge requests found
......@@ -140,7 +140,7 @@ def initialize_sys_path():
legacy_upgrade_path = os.path.join(base_path, 'base', 'maintenance', 'migrations')
for up in (tools.config['upgrade_path'] or legacy_upgrade_path).split(','):
up = os.path.normcase(os.path.abspath(tools.ustr(up.strip())))
if up not in upgrade.__path__:
if os.path.isdir(up) and up not in upgrade.__path__:
upgrade.__path__.append(up)
# create decrecated module alias from odoo.addons.base.maintenance.migrations to odoo.upgrade
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment