mirror of
https://github.com/directus/directus.git
synced 2026-01-23 11:47:59 -05:00
fix loading wrong relations (#4876)
This commit is contained in:
@@ -52,7 +52,10 @@ export const useRelationsStore = createStore({
|
||||
}
|
||||
|
||||
const relations: Relation[] = this.getRelationsForCollection(collection).filter((relation: Relation) => {
|
||||
return relation.many_field === field || relation.one_field === field;
|
||||
return (
|
||||
(relation.many_collection === collection && relation.many_field === field) ||
|
||||
(relation.one_collection === collection && relation.one_field === field)
|
||||
);
|
||||
});
|
||||
|
||||
if (relations.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user