fix: path generation and usages in saving new and existing files for nested collections

This commit is contained in:
Daniel Lautzenheiser
2023-04-17 12:11:06 -04:00
parent 2eaecc948e
commit 117320046f
13 changed files with 109 additions and 38 deletions

@ -822,6 +822,7 @@ export class Backend<EF extends BaseField = UnknownField, BC extends BackendClas
async persistEntry({
config,
rootSlug,
collection,
entryDraft: draft,
assetProxies,
@ -841,7 +842,7 @@ export class Backend<EF extends BaseField = UnknownField, BC extends BackendClas
const newEntry = entryDraft.entry.newRecord ?? false;
const customPath = selectCustomPath(draft.entry, collection);
const customPath = selectCustomPath(draft.entry, collection, rootSlug, config);
let dataFile: DataFile;
if (newEntry) {