We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
services -d
1 parent 5e254f2 commit 0ab991bCopy full SHA for 0ab991b
lib/msf/core/db_manager/service.rb
@@ -6,7 +6,14 @@ def delete_service(opts)
6
::ApplicationRecord.connection_pool.with_connection {
7
deleted = []
8
opts[:ids].each do |service_id|
9
- service = Mdm::Service.find(service_id)
+ begin
10
+ service = Mdm::Service.find(service_id)
11
+ rescue ActiveRecord::RecordNotFound
12
+ # This happens when the service was the child of another service we have already deleted
13
+ # Deletion of children is automatic via dependent: :destroy on the association
14
+ dlog("Service with id #{service_id} already deleted")
15
+ next
16
+ end
17
begin
18
deleted << service.destroy
19
rescue
0 commit comments