Fixed: RecordNotUnique in Issue#set_serial_id

This commit is contained in:
Vokhmin Alexey V 2014-10-18 00:05:08 +04:00
parent a1334232cf
commit fdf5a05cbd
1 changed files with 3 additions and 0 deletions

View File

@ -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