fix crash 'Object of type ExtendedArchitecture is not JSON serializable'

This commit is contained in:
LeonOstrez
2025-01-09 11:30:39 +01:00
parent efbad3f162
commit ff25998139

View File

@@ -1,3 +1,4 @@
import json
from enum import Enum
from typing import Any, Optional
@@ -183,7 +184,7 @@ class Architect(BaseAgent):
spec.templates = {t.name: t.options_dict for t in templates.values()}
spec.system_dependencies = [d.model_dump() for d in arch.system_dependencies]
spec.package_dependencies = [d.model_dump() for d in arch.package_dependencies]
telemetry.set("architecture", arch)
telemetry.set("architecture", json.loads(arch.model_dump_json()))
async def check_compatibility(self, arch: Architecture) -> bool:
warn_system_deps = [dep.name for dep in arch.system_dependencies if dep.name.lower() in WARN_SYSTEM_DEPS]