Resolve device profiles by alias when the reference includes a .yaml extension

This commit is contained in:
Sterling Archer committed 2026-08-11 17:02:40 -07:00
1 parent 219fdf003e
commit fc351246e9
1 file changed
+6 -1
+6 -1
View File
@@ -126,8 +126,13 @@ def resolve_profile(reference, kind):
def _slug(value):
text = str(value)
for suffix in (".yaml", ".yml"):
if text.lower().endswith(suffix):
text = text[: -len(suffix)]
break
return "".join(
char.lower() if char.isalnum() else "-" for char in str(value)
char.lower() if char.isalnum() else "-" for char in text
).strip("-")