Fix this up so that it works for this function as well
git-svn-id: file:///home/svn/framework3/trunk@13610 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
c1baf51bad
commit
7e474fe29a
|
@ -543,6 +543,7 @@ class DBManager
|
||||||
return if not active
|
return if not active
|
||||||
raise ArgumentError.new("Missing required option :session") if opts[:session].nil?
|
raise ArgumentError.new("Missing required option :session") if opts[:session].nil?
|
||||||
raise ArgumentError.new("Expected an :etype") unless opts[:etype]
|
raise ArgumentError.new("Expected an :etype") unless opts[:etype]
|
||||||
|
session = nil
|
||||||
|
|
||||||
if opts[:session].respond_to? :db_record
|
if opts[:session].respond_to? :db_record
|
||||||
session = opts[:session].db_record
|
session = opts[:session].db_record
|
||||||
|
@ -563,7 +564,7 @@ class DBManager
|
||||||
event_data = { :created_at => opts[:created_at] }
|
event_data = { :created_at => opts[:created_at] }
|
||||||
end
|
end
|
||||||
|
|
||||||
unless s.respond_to?(:sid)
|
unless session.respond_to?(:sid)
|
||||||
raise ArgumentError.new("Invalid :session, expected Session object got #{session.class}")
|
raise ArgumentError.new("Invalid :session, expected Session object got #{session.class}")
|
||||||
end
|
end
|
||||||
event_data[:session_id] = session.id
|
event_data[:session_id] = session.id
|
||||||
|
|
Loading…
Reference in New Issue