mirror of
https://github.com/directus/directus.git
synced 2026-01-25 18:18:06 -05:00
Delete related m2o when deleting collection that holds o2m
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user