diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2013-06-08 09:50:34 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2013-06-08 09:50:34 +0000 |
commit | a0423f4eb132b8e5b93f0c474f6196397cef63d7 (patch) | |
tree | c059a2af33d6b01da413ee4ec79fcf87d677b89d /app | |
parent | 2a00c33a614919178cc6aea3a79e4d5cc4e0e813 (diff) | |
download | redmine-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.rb | 2 |
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 |