mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
Fix bug on null description (#162106)
## Summary
Closes https://github.com/elastic/kibana/issues/162069
Fixes the validation error on the content management service if the
description is set to null.
I am not sure how the description can be set to null. If I create a Lens
so in 7.17 and I don't set the description then it is automatically set
to '' (empty string)
I can think of 2 ways:
- It was possible in older kibana versions
- Someone changed the SO manually and set this to null
This change fixes it with allowing the schema to also set nullable
values.
Note: Maybe covers the undefined case.
To test it just import the SO given by Bhavya here
https://github.com/elastic/kibana/issues/162069
<img width="2496" alt="image"
src="481ef105
-2efb-47c0-9d06-94f7fddbf703">
This commit is contained in:
parent
0516caed1d
commit
2e1d36a10a
2 changed files with 2 additions and 2 deletions
|
@ -29,7 +29,7 @@ const referencesSchema = schema.arrayOf(referenceSchema);
|
|||
const visualizeAttributesSchema = schema.object(
|
||||
{
|
||||
title: schema.string(),
|
||||
description: schema.maybe(schema.string()),
|
||||
description: schema.maybe(schema.nullable(schema.string())),
|
||||
version: schema.maybe(schema.number()),
|
||||
kibanaSavedObjectMeta: schema.maybe(schema.object({ searchSourceJSON: schema.string() })),
|
||||
uiStateJSON: schema.maybe(schema.string()),
|
||||
|
|
|
@ -28,7 +28,7 @@ const referencesSchema = schema.arrayOf(referenceSchema);
|
|||
const lensAttributesSchema = schema.object(
|
||||
{
|
||||
title: schema.string(),
|
||||
description: schema.maybe(schema.string()),
|
||||
description: schema.maybe(schema.nullable(schema.string())),
|
||||
visualizationType: schema.maybe(schema.string()),
|
||||
state: schema.maybe(schema.any()),
|
||||
uiStateJSON: schema.maybe(schema.string()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue