Fixes #3703 - Organization removal does not clear organization_id from Tickets.

This commit is contained in:
Rolf Schmidt 2021-08-20 11:11:20 +01:00
parent 506c6aef8c
commit ac5b0b85ce

View file

@ -64,7 +64,7 @@ class Organization < ApplicationModel
User.where(organization_id: id).find_each do |user|
user.update(organization_id: nil)
end
Ticket.where(organization_id: id) do |ticket|
Ticket.where(organization_id: id).find_each do |ticket|
ticket.update(organization_id: nil)
end
end