Skip to content

Commit 40ebe60

Browse files
authored
Merge pull request #317 from opsmill/pog-update-generator-process-nodes-schema-cache
Update process_nodes to use new format of schema cache
2 parents a56a48e + bc9fe84 commit 40ebe60

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

changelog/+4507ed25.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed an issue where the process_nodes method in the generators used the old format of the schema hash, so node population didn't work

infrahub_sdk/generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ async def process_nodes(self, data: dict) -> None:
125125
await self._init_client.schema.all(branch=self.branch_name)
126126

127127
for kind in data:
128-
if kind in self._init_client.schema.cache[self.branch_name]:
128+
if kind in self._init_client.schema.cache[self.branch_name].nodes.keys():
129129
for result in data[kind].get("edges", []):
130130
node = await self.infrahub_node.from_graphql(
131131
client=self._init_client, branch=self.branch_name, data=result

0 commit comments

Comments
 (0)