Skip to content
Snippets Groups Projects
Commit e0b6eb3e authored by Adrian Torres's avatar Adrian Torres Committed by GitHub
Browse files

[FIX] loading: Don't add None to installed apps (#19850)

Previous to this rev., sometimes None could be added
to the list of _init_modules in the registry, this would
then be problematic in ir_http since a sorted would be
performed on this list, which works in py2 but in py3
None and string can't be compared implicitly.
parent 35993ba0
Branches
Tags
No related merge requests found
......@@ -166,7 +166,8 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, skip_modules=
overwrite = odoo.tools.config["overwrite_existing_translations"]
module.with_context(overwrite=overwrite)._update_translations()
registry._init_modules.add(package.name)
if package.name is not None:
registry._init_modules.add(package.name)
if new_install:
post_init = package.info.get('post_init_hook')
......@@ -201,7 +202,8 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, skip_modules=
if hasattr(package, kind):
delattr(package, kind)
registry._init_modules.add(package.name)
if package.name is not None:
registry._init_modules.add(package.name)
cr.commit()
_logger.log(25, "%s modules loaded in %.2fs, %s queries", len(graph), time.time() - t0, odoo.sql_db.sql_counter - t0_sql)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment