diff --git a/app/models/issue.rb b/app/models/issue.rb index 7c0fd8c64..80231321f 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -85,6 +85,9 @@ class Issue < ActiveRecord::Base def set_serial_id self.serial_id = self.project.issues.count self.save! + rescue ActiveRecord::RecordNotUnique + self.serial_id += 1 + self.save! end def subscribe_users