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,
|
||||
CASE WHEN (value::json->'hidden')::text = 'null' THEN
|
||||
false
|
||||
ELSE
|
||||
WHEN (value::jsonb ? 'hidden') THEN
|
||||
(value::json->'hidden')::text::boolean
|
||||
ELSE
|
||||
false
|
||||
END,
|
||||
:now,
|
||||
:now
|
||||
|
@ -62,8 +64,10 @@ class CreateDataExplorerQueries < ActiveRecord::Migration[6.0]
|
|||
END,
|
||||
CASE WHEN (value::json->'hidden')::text = 'null' THEN
|
||||
false
|
||||
ELSE
|
||||
WHEN (value::jsonb ? 'hidden') THEN
|
||||
(value::json->'hidden')::text::boolean
|
||||
ELSE
|
||||
false
|
||||
END,
|
||||
:now,
|
||||
:now
|
||||
|
|
Loading…
Reference in New Issue