mirror of
https://github.com/strapi/strapi.git
synced 2025-11-01 10:23:34 +00:00
fix(graphql): filter out orphaned relationships (#7363)
Signed-off-by: Adam Lee <admosity@users.noreply.github.com>
This commit is contained in:
parent
ad68fbb7b5
commit
c8dc074d3b
@ -212,7 +212,7 @@ const createAggregationFieldsResolver = function(model, fields, operation, typeC
|
||||
* Correctly format the data returned by the group by
|
||||
*/
|
||||
const preProcessGroupByData = function({ result, fieldKey, filters }) {
|
||||
const _result = _.toArray(result);
|
||||
const _result = _.toArray(result).filter(value => Boolean(value._id));
|
||||
return _.map(_result, value => {
|
||||
return {
|
||||
key: value._id.toString(),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user