Replace all `null` literals with `none` (valid Jinja2/Python) in all three templates. Add explicit `is defined and is not none and .node is not none` guards before accessing nested nodes on optional GraphQL relationships, to avoid `Undefined is not JSON serializable` errors at render time. Also add `| default(none)` on optional scalar attributes (speed, mode, lacp_mode, mlag_id, mtu, description, virtual_router_address, route_distinguisher, learn_restrict, vlan_type, trunk_groups) so that Infrahub `Undefined` values from unset optional fields are safely coerced to JSON null rather than crashing tojson serialization. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3.3 KiB
3.3 KiB