From d0b1bc858ef33fa2a1d15f59890a67e1d695fbf2 Mon Sep 17 00:00:00 2001 From: Tim <32556895+Avarei@users.noreply.github.com> Date: Fri, 5 Jul 2024 01:13:59 +0200 Subject: [PATCH] fix mistake from 18acad4 Signed-off-by: Tim <32556895+Avarei@users.noreply.github.com> --- pkl/crossplane.contrib/crossplane.pkl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkl/crossplane.contrib/crossplane.pkl b/pkl/crossplane.contrib/crossplane.pkl index acc4165..dec6751 100644 --- a/pkl/crossplane.contrib/crossplane.pkl +++ b/pkl/crossplane.contrib/crossplane.pkl @@ -135,8 +135,8 @@ local function convert(value: Any, type: reflect.Type?): Any = let (template = getResourceTemplate(value, customResourceTemplates)) // TODO: replace customResourceTemplate with actual val value .toMap() - .map((k, v) -> Pair(k, convert(v, reflect.Class(pkl.getClass()).properties.getOrNull(k)?.type))) - .toTyped(pkl.getClass()) + .map((k, v) -> Pair(k, convert(v, reflect.Class(template.getClass()).properties.getOrNull(k)?.type))) + .toTyped(template.getClass()) else if (value is Mapping && referent is reflect.Class && referent.isSubclassOf(typedClass)) value .toMap()