Skip to content
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

Adds unique within region check to pxe image type names #16745

Merged
merged 1 commit into from
Jan 31, 2018

Conversation

d-m-u
Copy link
Contributor

@d-m-u d-m-u commented Jan 4, 2018

I'm pretty sure these template names should be unique by region.

#16739 led me to this issue.

@d-m-u
Copy link
Contributor Author

d-m-u commented Jan 29, 2018

@d-m-u d-m-u changed the title [WIP] Adds unique within region check to pxe image type names Adds unique within region check to pxe image type names Jan 29, 2018
@miq-bot miq-bot removed the wip label Jan 29, 2018
@@ -4,7 +4,7 @@ class PxeImageType < ApplicationRecord
has_many :windows_images
has_many :iso_images

validates_uniqueness_of :name
validates_uniqueness_of :name, :unique_within_region => true, :message => "Pxe Image Type name (%{value}) has already been taken"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was there a problem with the default message?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolutely, it doesn't distinguish between the pxe_image_type name and the name of the customization_template.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But those are different screens
image
image

@d-m-u d-m-u force-pushed the pxe_image_type_unique_in_region branch 2 times, most recently from 5d9e7d5 to f657018 Compare January 31, 2018 14:42
@d-m-u d-m-u force-pushed the pxe_image_type_unique_in_region branch from f657018 to 130f087 Compare January 31, 2018 14:52
@miq-bot
Copy link
Member

miq-bot commented Jan 31, 2018

Checked commit d-m-u@130f087 with ruby 2.3.3, rubocop 0.52.0, haml-lint 0.20.0, and yamllint 1.10.0
1 file checked, 0 offenses detected
Everything looks fine. 🏆

@bdunne bdunne merged commit 1ab1499 into ManageIQ:master Jan 31, 2018
@bdunne bdunne added this to the Sprint 79 Ending Feb 12, 2018 milestone Jan 31, 2018
@bdunne bdunne assigned bdunne and unassigned gmcculloug Jan 31, 2018
@d-m-u d-m-u deleted the pxe_image_type_unique_in_region branch January 31, 2018 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants