Skip to content

Commit cdd98b3

Browse files
committed
Set primary_node on proposed change event
1 parent d1aa95c commit cdd98b3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

backend/infrahub/events/proposed_change_action.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
from pydantic import Field
44

5+
from infrahub.core.constants import InfrahubKind
6+
57
from .constants import EVENT_NAMESPACE
68
from .models import InfrahubEvent
79

@@ -14,7 +16,8 @@ class ProposedChangeEvent(InfrahubEvent):
1416
def get_resource(self) -> dict[str, str]:
1517
return {
1618
"prefect.resource.id": f"infrahub.proposed_change.{self.proposed_change_id}",
17-
"infrahub.proposed_change.id": self.proposed_change_id,
19+
"infrahub.node.kind": InfrahubKind.PROPOSEDCHANGE,
20+
"infrahub.node.id": self.proposed_change_id,
1821
"infrahub.proposed_change.name": self.proposed_change_name,
1922
"infrahub.proposed_change.state": self.proposed_change_state,
2023
"infrahub.branch.name": self.meta.context.branch.name,

0 commit comments

Comments
 (0)