adminforth 1.12.2-next.1 → 1.12.2-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -141,7 +141,14 @@ async function saveRecord() {
|
|
|
141
141
|
saving.value = true;
|
|
142
142
|
const updates = {};
|
|
143
143
|
for (const key in record.value) {
|
|
144
|
-
|
|
144
|
+
let columnIsUpdated = record.value[key] !== coreStore.record[key];
|
|
145
|
+
|
|
146
|
+
const column = coreStore.resource.columns.find((c) => c.name === key);
|
|
147
|
+
if (column?.foreignResource) {
|
|
148
|
+
columnIsUpdated = record.value[key] !== coreStore.record[key].pk;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
if (columnIsUpdated) {
|
|
145
152
|
updates[key] = record.value[key];
|
|
146
153
|
}
|
|
147
154
|
}
|