Improved creation of test tickets check.
This commit is contained in:
parent
ea4fa03561
commit
70bd720caf
1 changed files with 2 additions and 2 deletions
|
@ -186,7 +186,7 @@ class FirstStepsController < ApplicationController
|
|||
)
|
||||
UserInfo.current_user_id = customer.id
|
||||
ticket = Ticket.create(
|
||||
group_id: Group.find_by(active: true).id,
|
||||
group_id: Group.find_by(active: true, name: 'Users').id,
|
||||
customer_id: customer.id,
|
||||
owner_id: User.find_by(login: '-').id,
|
||||
title: result[:subject],
|
||||
|
@ -242,7 +242,7 @@ class FirstStepsController < ApplicationController
|
|||
if !test_customer
|
||||
test_ticket_active = false
|
||||
end
|
||||
if Group.where(active: true).count > 1
|
||||
if Group.where(active: true, name: 'Users').count == 0
|
||||
test_ticket_active = false
|
||||
end
|
||||
return result if test_ticket_active
|
||||
|
|
Loading…
Reference in a new issue