Skip to content

Commit

Permalink
Ensure module details are marked as ready
Browse files Browse the repository at this point in the history
  • Loading branch information
adfoster-r7 committed Dec 31, 2024
1 parent a133b58 commit a422d06
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/msf/core/db_manager/module_cache.rb
Original file line number Diff line number Diff line change
Expand Up @@ -408,13 +408,16 @@ def insert_all(modules)
end
end

# 3) Insert all of the associations
# 3) Insert the child associations
associations.each do |association_clazz, entries|
next if entries.empty?

association_clazz.insert_all!(entries)
end

# 4) Mark the parent models as ready - to avoid repopulating the cache again
Mdm::Module::Detail.where(id: module_detail_ids).update_all(ready: true)

nil
end
end

0 comments on commit a422d06

Please sign in to comment.