Skip to content

Commit 1a428d2

Browse files
committed
Fix incorrect event value for proposed change state after merging
Fixes #5600
1 parent 0ccecd1 commit 1a428d2

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

backend/infrahub/graphql/mutations/proposed_change.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@ async def mutate_update(
135135
"proposed_change_name": proposed_change.name.value,
136136
},
137137
)
138+
# When the PROPOSED_CHANGE_MERGE succeeds it will have correctly changed the state
139+
# from the overridden "merging" value, so here we change it back to reflect the
140+
# correct value for the event that will be generated.
141+
proposed_change.node_changelog.attributes["state"].value = ProposedChangeState.MERGED.value
138142

139143
return proposed_change, result
140144

changelog/5600.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Set correct state in events after merging a proposed change, they were incorrectly set as "merging" instead of "merged"

0 commit comments

Comments
 (0)