allow new duplicated collection to edit the collection of relation fields

This commit is contained in:
Gani Georgiev committed 2026-08-12 12:59:52 +03:00
1 parent 6212276c82
commit 3668e1c431
8 files changed
+14 -8

No files matched your search

@@ -231,6 +231,12 @@ function collectionUpsertModal(rawCollection, modalSettings) {
clone.created = "";
clone.updated = "";
// reset field ids
// (in case the field relies on the id to dinstinguish new vs old)
clone.fields?.forEach((field) => {
delete field.id;
});
// updated indexes ids
clone.indexes = clone.indexes?.map((idx) => {
return app.utils.replaceIndexFields(idx, (parsed) => {