Getting InlineAttributes by considering the full type as ID not the " * "

This commit is contained in:
TeoV
2020-01-15 16:48:48 +02:00
parent 7bd4d48c44
commit 6a0a45adca
2 changed files with 10 additions and 1 deletions

View File

@@ -1803,7 +1803,14 @@ func (dm *DataManager) GetAttributeProfile(tenant, id string, cacheRead, cacheWr
return x.(*AttributeProfile), nil
}
}
if strings.HasPrefix(id, utils.Meta) {
isInline := false
for typeAttr := range utils.AttrInlineTypes.Data() {
if strings.HasPrefix(id, typeAttr) {
isInline = true
break
}
}
if isInline {
attrPrfl, err = NewAttributeFromInline(tenant, id)
} else if dm == nil {
err = utils.ErrNoDatabaseConn

View File

@@ -31,6 +31,8 @@ var (
ItemList = NewStringSet([]string{MetaAccounts, MetaAttributes, MetaChargers, MetaDispatchers, MetaDispatcherHosts,
MetaFilters, MetaResources, MetaStats, MetaThresholds, MetaSuppliers,
})
AttrInlineTypes = NewStringSet([]string{META_CONSTANT, MetaVariable, META_COMPOSED, META_USAGE_DIFFERENCE,
MetaSum, MetaValueExponent})
GitLastLog string // If set, it will be processed as part of versioning
PosterTransportContentTypes = map[string]string{