Fixed loop to verify is ticket# already exists.

This commit is contained in:
Martin Edenhofer 2012-11-28 15:12:45 +01:00
parent b17a1118f1
commit dd82093ca0

View file

@ -389,7 +389,7 @@ class Ticket < ApplicationModel
number = Ticket.number_adapter.number_generate_item()
ticket = Ticket.where( :number => number ).first
if ticket != nil
number = number_adapter.number_generate_item()
number = Ticket.number_adapter.number_generate_item()
else
self.number = number
return number