mirror of
https://github.com/directus/directus.git
synced 2026-01-30 04:58:17 -05:00
Remove relation when translations field is deleted (#11584)
This commit is contained in:
@@ -223,7 +223,12 @@ export const useFieldsStore = defineStore({
|
||||
});
|
||||
|
||||
relationsStore.relations = relationsStore.relations.filter((relation) => {
|
||||
if (relation.collection === collectionKey && relation.field === fieldKey) return false;
|
||||
if (
|
||||
(relation.collection === collectionKey && relation.field === fieldKey) ||
|
||||
(relation.related_collection === collectionKey && relation.meta?.one_field === fieldKey)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user