-
Notifications
You must be signed in to change notification settings - Fork 983
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
fixes #5788 - before_destroy missing from EnsureNotUsedBy.new in SmartProxy model #1453
Conversation
@@ -4,7 +4,7 @@ class SmartProxy < ActiveRecord::Base | |||
audited :allow_mass_assignment => true | |||
|
|||
attr_accessible :name, :url, :location_ids, :organization_ids | |||
EnsureNotUsedBy.new(:hosts, :hostgroups, :subnets, :domains, :puppet_ca_hosts, :puppet_ca_hostgroups) | |||
before_destroy EnsureNotUsedBy.new(:hosts, :hostgroups, :subnets, :domains, :puppet_ca_hosts, :puppet_ca_hostgroups) |
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.
realms too, come to think of it
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.
realm.rb has before_destroy
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.
right, but this line is checking that the proxy isn't used on another resource, so we should probably ensure it's not used by a realm too
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.
fixed and re-committed.
…ew in SmartProxy model
Merged as f20ddfe for Foreman 1.5.1, thanks @isratrade. |
No description provided.