FIX: dont error when json don't contain hidden key
This commit is contained in:
parent
353da45b6f
commit
7696d459a4
|
@ -37,8 +37,10 @@ class CreateDataExplorerQueries < ActiveRecord::Migration[6.0]
|
||||||
END,
|
END,
|
||||||
CASE WHEN (value::json->'hidden')::text = 'null' THEN
|
CASE WHEN (value::json->'hidden')::text = 'null' THEN
|
||||||
false
|
false
|
||||||
ELSE
|
WHEN (value::jsonb ? 'hidden') THEN
|
||||||
(value::json->'hidden')::text::boolean
|
(value::json->'hidden')::text::boolean
|
||||||
|
ELSE
|
||||||
|
false
|
||||||
END,
|
END,
|
||||||
:now,
|
:now,
|
||||||
:now
|
:now
|
||||||
|
@ -62,8 +64,10 @@ class CreateDataExplorerQueries < ActiveRecord::Migration[6.0]
|
||||||
END,
|
END,
|
||||||
CASE WHEN (value::json->'hidden')::text = 'null' THEN
|
CASE WHEN (value::json->'hidden')::text = 'null' THEN
|
||||||
false
|
false
|
||||||
ELSE
|
WHEN (value::jsonb ? 'hidden') THEN
|
||||||
(value::json->'hidden')::text::boolean
|
(value::json->'hidden')::text::boolean
|
||||||
|
ELSE
|
||||||
|
false
|
||||||
END,
|
END,
|
||||||
:now,
|
:now,
|
||||||
:now
|
:now
|
||||||
|
|
Loading…
Reference in New Issue