fix(Explore): Undefined owners (#17167)

* Reconcile owners data

* Fix on save
This commit is contained in:
Geido
2021-10-20 18:45:58 +03:00
committed by GitHub
parent e32acd22fd
commit f580f6bcba
2 changed files with 7 additions and 4 deletions

View File

@@ -409,8 +409,8 @@ class DatasourceEditor extends React.PureComponent {
datasource: {
...props.datasource,
owners: props.datasource.owners.map(owner => ({
value: owner.id,
label: `${owner.first_name} ${owner.last_name}`,
value: owner.value || owner.id,
label: owner.label || `${owner.first_name} ${owner.last_name}`,
})),
metrics: props.datasource.metrics?.map(metric => {
const {