was missing a nil check
parent
a40b6a3569
commit
2e26256217
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20130531144949) do
|
||||
ActiveRecord::Schema.define(:version => 20130604145732) do
|
||||
|
||||
create_table "api_keys", :force => true do |t|
|
||||
t.text "token"
|
||||
|
@ -440,6 +440,13 @@ ActiveRecord::Schema.define(:version => 20130531144949) do
|
|||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
create_table "task_sessions", :force => true do |t|
|
||||
t.integer "task_id", :null => false
|
||||
t.integer "session_id", :null => false
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
create_table "tasks", :force => true do |t|
|
||||
t.integer "workspace_id", :default => 1, :null => false
|
||||
t.string "created_by"
|
||||
|
|
|
@ -786,7 +786,7 @@ class DBManager
|
|||
s = ::Mdm::Session.new(sess_data)
|
||||
s.save!
|
||||
|
||||
if session.exploit_task and session.exploit_task.record
|
||||
if session and session.exploit_task and session.exploit_task.record
|
||||
session_task = session.exploit_task.record
|
||||
if session_task.class == Mdm::Task
|
||||
Mdm::TaskSession.create(:task => session_task, :session => s )
|
||||
|
|
Loading…
Reference in New Issue