Merge pull request #364 from nubenetes/feat/fix-resource-type-none

fix: None resource_type crash in _calculate_tags
This commit is contained in:
Inaki
2026-06-19 11:43:05 +02:00
committed by GitHub

View File

@@ -639,7 +639,7 @@ class V2VisionEngine:
if "[COMMUNITY-TOOL]" in tags: tags.remove("[COMMUNITY-TOOL]")
# 2. Type Mapping (AI based labels)
res_type = item.get("resource_type", "Reference").lower()
res_type = (item.get("resource_type") or "Reference").lower()
if any(x in res_type for x in ["guide", "tutorial", "hands-on", "learning", "course"]):
tags.add("[GUIDE]")
if any(x in res_type for x in ["case study", "report", "whitepaper", "success story", "usage"]):