summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2013-06-08 09:50:34 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2013-06-08 09:50:34 +0000
commita0423f4eb132b8e5b93f0c474f6196397cef63d7 (patch)
treec059a2af33d6b01da413ee4ec79fcf87d677b89d /app
parent2a00c33a614919178cc6aea3a79e4d5cc4e0e813 (diff)
downloadredmine-a0423f4eb132b8e5b93f0c474f6196397cef63d7.tar.gz
redmine-a0423f4eb132b8e5b93f0c474f6196397cef63d7.zip
fix that project auto generation fails when projects created in the same time (#14242)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11942 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/models/project.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index f5ae92f9b..d83b4758f 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -688,7 +688,7 @@ class Project < ActiveRecord::Base
# Returns an auto-generated project identifier based on the last identifier used
def self.next_identifier
- p = Project.order('created_on DESC').first
+ p = Project.order('id DESC').first
p.nil? ? nil : p.identifier.to_s.succ
end