From 8c11f5ae917a0f81b4bcf604c76b3967430ba111 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Wed, 6 Mar 2013 06:37:44 -0500 Subject: retrieving fax objects fixed --- misc/freeswitch/scripts/common/object.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/freeswitch/scripts/common/object.lua b/misc/freeswitch/scripts/common/object.lua index 5183b9f..8c195e5 100644 --- a/misc/freeswitch/scripts/common/object.lua +++ b/misc/freeswitch/scripts/common/object.lua @@ -87,13 +87,13 @@ function Object.find(self, attributes) elseif class == 'faxaccount' then require 'dialplan.fax'; if tonumber(attributes.id) then - fax_account = dialplan.fax.Fax:new{ log = self.log, database = self.database }:find_by_id(attributes.id); + object = dialplan.fax.Fax:new{ log = self.log, database = self.database }:find_by_id(attributes.id); elseif not common.str.blank(attributes.uuid) then - fax_account = dialplan.fax.Fax:new{ log = self.log, database = self.database }:find_by_uuid(attributes.uuid); + object = dialplan.fax.Fax:new{ log = self.log, database = self.database }:find_by_uuid(attributes.uuid); end if object then - object.owner = self:find{class = fax_account.record.fax_accountable_type, id = tonumber(fax_account.record.fax_accountable_id)}; + object.owner = self:find{class = object.record.fax_accountable_type, id = tonumber(object.record.fax_accountable_id)}; end end -- cgit v1.2.3