tpl/collections: Include key in IsSet unsupported-type warning

The warning logged when calling IsSet with an unsupported type did not
identify which key triggered it, making it hard to locate the offending
template. Include the key in the message.

Fixes #11794
This commit is contained in:
bejaratommy
2026-06-24 10:18:38 +00:00
committed by Bjørn Erik Pedersen
parent a879ebfaaa
commit 671897ae91
+1 -1
View File
@@ -347,7 +347,7 @@ func (ns *Namespace) IsSet(c any, key any) (bool, error) {
return av.MapIndex(kv).IsValid(), nil
}
default:
ns.deps.Log.Warnf("calling IsSet with unsupported type %q (%T) will always return false.\n", av.Kind(), c)
ns.deps.Log.Warnf("calling IsSet with unsupported type %q (%T) for key %v will always return false.\n", av.Kind(), c, key)
}
return false, nil