Skip to content

Commit

Permalink
Return the merged parameter for a data provider item.
Browse files Browse the repository at this point in the history
The function "getData" returns the merged parameters as a second value.
The merged parameters are a combination of the parameter found in the
data provider configuration and the local configuration passed to
"getData".
  • Loading branch information
docbacardi committed Nov 3, 2023
1 parent b0d4324 commit f74551d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lua/data_provider_pt.lua
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ function DataProviderPt:getData(strItemName, tLocalConfig)
local tLog = self.tLog
local atCache
local tData
local tMergedConfig


local tItemAttr, strError = self:__getItemAttr(strItemName)
Expand All @@ -285,7 +286,7 @@ function DataProviderPt:getData(strItemName, tLocalConfig)
tLog.debug('Using plugin "%s".', tPluginAttr.id)

-- Merge the configuration.
local tMergedConfig = {}
tMergedConfig = {}
self:deepUpdate(
tMergedConfig,
tItemAttr.cfg
Expand Down Expand Up @@ -344,7 +345,7 @@ function DataProviderPt:getData(strItemName, tLocalConfig)
end
end

return tData
return tData, tMergedConfig
end

return DataProviderPt

0 comments on commit f74551d

Please sign in to comment.