-
Notifications
You must be signed in to change notification settings - Fork 898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nullify dependents when destroying configuration_script_sources/configuration_scripts #14567
Conversation
a129798
to
1b81b6f
Compare
@jameswnl Cannot apply the following label because they are not recognized: providers/ansible_provider |
@miq-bot add_labels providers/ansible_tower |
@miq-bot add_label fine/yes |
@miq-bot add_label euwe/no |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the BZ reference be removed since this doesn't fix the bug?
@@ -1,5 +1,5 @@ | |||
class ConfigurationScriptSource < ApplicationRecord | |||
has_many :configuration_script_payloads | |||
has_many :configuration_script_payloads, :dependent => :nullify |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be :dependent => :destroy
since the playbook is an array off of the project in tower.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, meant to change this to :destroy
after chatting with @bzwei , but got distracted by other bugs.
Now done. Thanks!
…onfiguration_scripts ManageIQ#14432
1b81b6f
to
ff08d81
Compare
Checked commit jameswnl@ff08d81 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
Nullify dependents when destroying configuration_script_sources/configuration_scripts (cherry picked from commit 2875c6c) https://bugzilla.redhat.com/show_bug.cgi?id=1438594
Fine backport details:
|
Fixing https://bugzilla.redhat.com/show_bug.cgi?id=1437108
Once #14432 is in, this similar issue will happen to configuration_scripts and it's children.
@miq-bot add_labels bug, providers/ansible_provider