Skip to content

Commit cde89b9

Browse files
David MaloneyDavid Maloney
authored andcommitted
Land rapid7#6744, Deprecation on host eager load
Lands SemperVictus' pr for fixing a deprecation warning on eager loading the hosts table
2 parents dcb6da3 + 992df12 commit cde89b9

File tree

1 file changed

+1
-1
lines changed
  • lib/msf/ui/console/command_dispatcher

1 file changed

+1
-1
lines changed

lib/msf/ui/console/command_dispatcher/db.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ def cmd_hosts(*args)
463463
if search_term
464464
next unless (
465465
host.attribute_names.any? { |a| host[a.intern].to_s.match(search_term) } ||
466-
!Mdm::Tag.includes(:hosts).where("hosts.workspace_id = ? and hosts.address = ? and tags.name = ?", framework.db.workspace.id, host.address, search_term.source).order("tags.id DESC").empty?
466+
!Mdm::Tag.includes(:hosts).where("hosts.workspace_id = ? and hosts.address = ? and tags.name = ?", framework.db.workspace.id, host.address, search_term.source).references(:hosts).order("tags.id DESC").empty?
467467
)
468468
end
469469

0 commit comments

Comments
 (0)