Delete related m2o when deleting collection that holds o2m

This commit is contained in:
rijkvanzanten
2020-08-31 19:37:18 -04:00
parent 6fc7bb98f1
commit f03e4dfd9d

View File

@@ -260,6 +260,7 @@ export default class CollectionsService {
await fieldsService.deleteField(relation.one_collection, relation.one_field);
} else {
await this.knex('directus_relations').update({ one_field: null }).where({ one_collection: collection, field: relation.one_field });
await fieldsService.deleteField(relation.many_collection, relation.many_field);
}
}