diff options
author | francis <francis> | 2008-04-17 22:09:05 +0000 |
---|---|---|
committer | francis <francis> | 2008-04-17 22:09:05 +0000 |
commit | a4c7f7dab87263c0ce5883cfc1f926cb893c8b75 (patch) | |
tree | 1d4e9ffd99b620a786decb911bac77581bca1d49 | |
parent | 24d94bec6bc1aececaaa1f3aad212b09f18d1495 (diff) |
Can have duplicate empty strings for short name.
-rw-r--r-- | app/models/public_body.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/public_body.rb b/app/models/public_body.rb index b03a173a2..57ebd4815 100644 --- a/app/models/public_body.rb +++ b/app/models/public_body.rb @@ -21,7 +21,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: public_body.rb,v 1.59 2008-04-16 09:46:46 francis Exp $ +# $Id: public_body.rb,v 1.60 2008-04-17 22:09:05 francis Exp $ require 'csv' require 'set' @@ -30,7 +30,7 @@ class PublicBody < ActiveRecord::Base validates_presence_of :name validates_presence_of :url_name - validates_uniqueness_of :short_name + validates_uniqueness_of :short_name, :if => Proc.new { |pb| pb.short_name != "" } validates_uniqueness_of :name has_many :info_requests |