Fixes #39175 - Unlock a clone of webhook template#98
Merged
adamruzicka merged 1 commit intotheforeman:masterfrom Mar 31, 2026
Merged
Fixes #39175 - Unlock a clone of webhook template#98adamruzicka merged 1 commit intotheforeman:masterfrom
adamruzicka merged 1 commit intotheforeman:masterfrom
Conversation
adamruzicka
approved these changes
Mar 31, 2026
Contributor
adamruzicka
left a comment
There was a problem hiding this comment.
I'm fine with this, just let me know if you want to address that one nitpick or not
| def clone | ||
| @webhook_template = @webhook_template.dup | ||
| original = @webhook_template | ||
| @webhook_template = original.dup |
Contributor
There was a problem hiding this comment.
This seems to discard taxonomy associations, but that wasn't introduced here so I'd be willing to leave it for a later issue.
A cloned webhook template should be unlocked even though the original was locked - that is one of the primary reasons to clone. Additionally, set cloned_from correctly.
adamruzicka
approved these changes
Mar 31, 2026
Contributor
|
Thank you @lhellebr ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cloning a webhook template resulted in a clone being locked. It should be unlocked. Fixed by setting locked=false before saving.