Skip to content

Commit 9e28a88

Browse files
committed
[FIX] crash on werkzeug patch if main EP is empty
1 parent b783f6c commit 9e28a88

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/src/core/python_arch_builder_hooks.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,9 @@ impl PythonArchBuilderHooks {
222222
let full_path_monkeypatches = S!("odoo._monkeypatches");
223223
let mut main_odoo_symbol = None;
224224
if let Some(main_ep) = session.sync_odoo.entry_point_mgr.borrow().main_entry_point.as_ref() {
225-
//To import from main entry point, we have to import 'from' a symbol coming from main entry point.
225+
//To import from main entry point, we have to import 'from' a symbol coming from main entry point.
226226
//We then use the main symbol of the main entry point to achieve that, instead of the werkzeug symbol
227-
main_odoo_symbol = Some(main_ep.borrow().get_symbol().unwrap());
227+
main_odoo_symbol = main_ep.borrow().get_symbol();
228228
}
229229
if let Some(main_odoo_symbol) = main_odoo_symbol {
230230
let werkzeug_patch = manual_import(session, &main_odoo_symbol, Some(full_path_monkeypatches), "werkzeug", None, None, &mut None);

0 commit comments

Comments
 (0)