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-b9f4589650da
unstable
HD Moore 2011-08-22 14:00:01 +00:00
parent c1baf51bad
commit 7e474fe29a
1 changed files with 2 additions and 1 deletions

View File

@ -543,6 +543,7 @@ class DBManager
return if not active
raise ArgumentError.new("Missing required option :session") if opts[:session].nil?
raise ArgumentError.new("Expected an :etype") unless opts[:etype]
session = nil
if opts[:session].respond_to? :db_record
session = opts[:session].db_record
@ -563,7 +564,7 @@ class DBManager
event_data = { :created_at => opts[:created_at] }
end
unless s.respond_to?(:sid)
unless session.respond_to?(:sid)
raise ArgumentError.new("Invalid :session, expected Session object got #{session.class}")
end
event_data[:session_id] = session.id