fix: check if fields exists
This commit is contained in:
parent
5b567300ec
commit
0e94950857
|
@ -18,7 +18,9 @@ export default class QueryFetch extends DataFetch {
|
||||||
}
|
}
|
||||||
const definition = await fetchQueryDefinition(datasource._id)
|
const definition = await fetchQueryDefinition(datasource._id)
|
||||||
// After getting the definition of query, it loses "fields" attribute because of security reason from the server. However, this attribute needs to be inside of defintion for pagination.
|
// After getting the definition of query, it loses "fields" attribute because of security reason from the server. However, this attribute needs to be inside of defintion for pagination.
|
||||||
|
if (!definition.fields) {
|
||||||
definition.fields = datasource.fields
|
definition.fields = datasource.fields
|
||||||
|
}
|
||||||
return definition
|
return definition
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue