Skip to content

Commit 8815310

Browse files
mmahroussfda-odoo
authored andcommitted
[FIX] server: fix error on hover with no main EP
1 parent 12f2c9d commit 8815310

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

server/src/core/entry_point.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ impl EntryPointMgr {
205205
)
206206
}
207207

208-
//iter through all main entry points, sorted by tree lenght (from bigger to smaller)
208+
//iter through all main entry points, sorted by tree length (from bigger to smaller)
209209
pub fn iter_main(&self) -> impl Iterator<Item = &Rc<RefCell<EntryPoint>>>
210210
{
211211
let mut collected = self.main_entry_point.iter().chain(self.addons_entry_points.iter()).collect::<Vec<_>>();

server/src/core/odoo.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ impl SyncOdoo {
800800
*/
801801
pub fn get_symbol_of_opened_file(session: &mut SessionInfo, path: &PathBuf) -> Option<Rc<RefCell<Symbol>>> {
802802
let path_in_tree = path.to_tree_path();
803-
for entry in session.sync_odoo.entry_point_mgr.borrow().iter_for_import(session.sync_odoo.entry_point_mgr.borrow().main_entry_point.as_ref().unwrap()) {
803+
for entry in session.sync_odoo.entry_point_mgr.borrow().iter_main() {
804804
if (entry.borrow().typ == EntryPointType::MAIN || entry.borrow().addon_to_odoo_path.is_some()) && entry.borrow().is_valid_for(path) {
805805
let tree = entry.borrow().get_tree_for_entry(path);
806806
let path_symbol = entry.borrow().root.borrow().get_symbol(&tree, u32::MAX);

0 commit comments

Comments
 (0)