mirror of
https://github.com/directus/directus.git
synced 2026-01-24 00:18:08 -05:00
Fix setting up multiple files
This commit is contained in:
@@ -13,6 +13,7 @@ import { getDisplays } from '@/displays';
|
||||
import { InterfaceConfig } from '@/interfaces/types';
|
||||
import { DisplayConfig } from '@/displays/types';
|
||||
import { Field } from '@/types';
|
||||
import Vue from 'vue';
|
||||
|
||||
const fieldsStore = useFieldsStore();
|
||||
const relationsStore = useRelationsStore();
|
||||
@@ -518,9 +519,9 @@ function initLocalStore(
|
||||
many_collection: '',
|
||||
many_field: '',
|
||||
many_primary: '',
|
||||
one_collection: type === 'files' ? 'directus_files' : '',
|
||||
one_collection: '',
|
||||
one_field: null,
|
||||
one_primary: type === 'files' ? 'id' : '',
|
||||
one_primary: '',
|
||||
},
|
||||
];
|
||||
}
|
||||
@@ -592,6 +593,13 @@ function initLocalStore(
|
||||
}
|
||||
);
|
||||
|
||||
if (type === 'files') {
|
||||
Vue.nextTick(() => {
|
||||
state.relations[1].one_collection = 'directus_files';
|
||||
state.relations[1].one_primary = 'id';
|
||||
});
|
||||
}
|
||||
|
||||
if (type !== 'translations') {
|
||||
let stop: WatchStopHandle;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user