Skip to content

Commit

Permalink
Validate name uniqueness for Transformation Plans
Browse files Browse the repository at this point in the history
Add a unique name validation, scoped to the tenant, for
ServiceTemplateTransformationPlans.

ManageIQ/manageiq-v2v#451
  • Loading branch information
agrare committed Jul 9, 2018
1 parent 178f498 commit dda7260
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/service_template_transformation_plan.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ def self.default_reconfiguration_entry_point
nil
end

validates :name, :presence => true, :uniqueness => {:scope => [:tenant_id]}

# create ServiceTemplate and supporting ServiceResources and ResourceActions
# options
# :name
Expand Down

0 comments on commit dda7260

Please sign in to comment.