Merge pull request #2672 from betagouv/frederic/fix_2613-cosmetic_improvement

Fix cosmétique
This commit is contained in:
Frederic Merizen 2018-09-25 15:07:43 +02:00 committed by GitHub
commit 0b990fd6ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,8 +27,8 @@ namespace :'2018_09_20_procedure_presentation_entreprise' do
ProcedurePresentation.find_by_sql( ProcedurePresentation.find_by_sql(
<<~SQL <<~SQL
SELECT procedure_presentations.*, array_agg(key) as keys SELECT procedure_presentations.*, array_agg(key) as keys
FROM procedure_presentations, LATERAL jsonb_each_text(filters) FROM procedure_presentations, LATERAL jsonb_each(filters)
WHERE value::jsonb @> '[{"table": "entreprise"}]' WHERE value @> '[{"table": "entreprise"}]'
GROUP BY id; GROUP BY id;
SQL SQL
).each do |procedure_presentation| ).each do |procedure_presentation|