summaryrefslogtreecommitdiffstats
path: root/app/models/repository.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-03-07 16:02:56 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-03-07 16:02:56 +0000
commit9ea438720ffc27eefb1e19e33c7c57b276386d01 (patch)
treede5391fddc83abbc36478b39eb2f923107a1441a /app/models/repository.rb
parent3789a8539e39bd3afe70b99b5eee7b52e3ed584f (diff)
downloadredmine-9ea438720ffc27eefb1e19e33c7c57b276386d01.tar.gz
redmine-9ea438720ffc27eefb1e19e33c7c57b276386d01.zip
Fixed that non-default identifier-less git repositories are undeletable (#19260).
Patch by Felix Schäfer. git-svn-id: http://svn.redmine.org/redmine/trunk@14050 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/repository.rb')
-rw-r--r--app/models/repository.rb1
1 files changed, 0 insertions, 1 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb
index 92dd55d5a..21e97bb6e 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -38,7 +38,6 @@ class Repository < ActiveRecord::Base
validates_length_of :password, :maximum => 255, :allow_nil => true
validates_length_of :identifier, :maximum => IDENTIFIER_MAX_LENGTH, :allow_blank => true
- validates_presence_of :identifier, :unless => Proc.new { |r| r.is_default? || r.set_as_default? }
validates_uniqueness_of :identifier, :scope => :project_id, :allow_blank => true
validates_exclusion_of :identifier, :in => %w(browse show entry raw changes annotate diff statistics graph revisions revision)
# donwcase letters, digits, dashes, underscores but not digits only