Fix primary display schemas when saving

This commit is contained in:
Andrew Kingston 2024-09-24 12:47:51 +01:00
parent fd21503f3e
commit 06c8e5f815
No known key found for this signature in database
1 changed files with 6 additions and 0 deletions

View File

@ -296,6 +296,12 @@
delete saveColumn.default
}
// Ensure primary display columns are always required and don't have default values
if (primaryDisplay) {
saveColumn.constraints.presence = true
delete saveColumn.default
}
try {
await tables.saveField({
originalName,