mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 01:47:18 +02:00
Story#108869472 - domain history search not failing whenregistrants not found
This commit is contained in:
parent
e9a8cf086b
commit
00b9d50c08
1 changed files with 4 additions and 2 deletions
|
@ -30,8 +30,10 @@ class Admin::DomainVersionsController < AdminController
|
|||
end
|
||||
end
|
||||
|
||||
whereS += " AND object->>'registrant_id' IN (#{registrants.map { |r| "'#{r.id.to_s}'" }.join ','})" if registrants
|
||||
whereS += " AND object->>'registrar_id' IN (#{registrars.map { |r| "'#{r.id.to_s}'" }.join ','})" if registrars
|
||||
whereS += " AND object->>'registrant_id' IN (#{registrants.map { |r| "'#{r.id.to_s}'" }.join ','})" if registrants.present?
|
||||
whereS += " AND 1=0" if registrants == []
|
||||
whereS += " AND object->>'registrar_id' IN (#{registrars.map { |r| "'#{r.id.to_s}'" }.join ','})" if registrars.present?
|
||||
whereS += " AND 1=0" if registrars == []
|
||||
|
||||
versions = DomainVersion.includes(:item).where(whereS)
|
||||
@q = versions.search(params[:q])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue