reset fields id on collection duplicate

This commit is contained in:
Gani Georgiev
2023-01-26 12:12:14 +02:00
parent 536707bfe7
commit a27298d1ef
31 changed files with 71 additions and 62 deletions
@@ -209,6 +209,13 @@
clone.created = "";
clone.updated = "";
clone.name += "_duplicate";
// reset the schema
if (!CommonHelper.isEmpty(clone.schema)) {
for (const field of clone.schema) {
field.id = "";
}
}
}
show(clone);