rollbacl changes

This commit is contained in:
olegphenomenon 2023-02-20 14:23:50 +02:00
parent d28cfda702
commit f33aff1ab8

View file

@ -37,7 +37,11 @@ module Admin
end end
where_s += ' AND 1=0' if registrants == [] where_s += ' AND 1=0' if registrants == []
if registrars.present? if registrars.present?
where_s += " AND object->>'registrar_id' IN (#{registrars.map { |r| "'#{r.id}'" }.join ','})"
# where_s += " AND object->>'registrar_id' IN (#{registrars.map { |r| "'#{r.id}'" }.join ','})"
where_s += " AND (object->>'registrar_id' IN (#{registrars.map { |r| "'#{r.id}'" }.join ','})
OR (object_changes @> '#{{ 'registrar_id': registrars.map(&:id) }.to_json}'))"
end end
where_s += ' AND 1=0' if registrars == [] where_s += ' AND 1=0' if registrars == []