summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-03-06 06:37:44 -0500
committerPeter Kozak <spag@golwen.net>2013-03-06 06:37:44 -0500
commit8c11f5ae917a0f81b4bcf604c76b3967430ba111 (patch)
treee7a45aa088e47836d7db5db952f6f3cac3804d47
parent860b346781a5c7508ad0158d26f34454be810860 (diff)
retrieving fax objects fixed
-rw-r--r--misc/freeswitch/scripts/common/object.lua6
1 files 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