From ee61a824346dd35e646fc9895b92fe1612b2d5d7 Mon Sep 17 00:00:00 2001 From: Jason Frey Date: Wed, 3 Jan 2018 14:27:38 -0500 Subject: [PATCH] Merge pull request #16731 from carbonin/validate_zone_name_within_region Ensure that the zone name is unique only within the current region (cherry picked from commit 1bf5290e0bdae708be0f2e8c8122b5768af449c2) Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1530820 --- app/models/zone.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/zone.rb b/app/models/zone.rb index 7836c3ebccf..b4dd26599a7 100644 --- a/app/models/zone.rb +++ b/app/models/zone.rb @@ -1,6 +1,6 @@ class Zone < ApplicationRecord validates_presence_of :name, :description - validates_uniqueness_of :name + validates :name, :unique_within_region => true serialize :settings, Hash