diff --git a/client/core/src/components/crud-model/crud-model.js b/client/core/src/components/crud-model/crud-model.js
index 9682416b5..a18ff4ad4 100644
--- a/client/core/src/components/crud-model/crud-model.js
+++ b/client/core/src/components/crud-model/crud-model.js
@@ -135,14 +135,14 @@ export default class CrudModel extends ModelProxy {
if (!this.isChanged)
return null;
- let create = [];
- let update = [];
- let remove = [];
+ let deletes = [];
+ let updates = [];
+ let creates = [];
let pk = this.primaryKey;
for (let row of this.removed)
- remove.push(row.$orgRow[pk]);
+ deletes.push(row.$orgRow[pk]);
for (let row of this._data)
if (row.$isNew) {
@@ -150,22 +150,22 @@ export default class CrudModel extends ModelProxy {
for (let prop in row)
if (prop.charAt(0) !== '$')
data[prop] = row[prop];
- create.push(data);
+ creates.push(data);
} else if (row.$oldData) {
let data = {};
for (let prop in row.$oldData)
data[prop] = row[prop];
- update.push({
+ updates.push({
data,
where: {[pk]: row.$orgRow[pk]}
});
}
- let changes = {
- create: create,
- update: update,
- delete: remove
- };
+ let changes = {deletes, updates, creates};
+
+ for (let prop in changes)
+ if (changes[prop].length === 0)
+ changes[prop] = undefined;
return changes;
}
diff --git a/client/ticket/src/weekly/index.html b/client/ticket/src/weekly/index.html
index 2af8f9ec4..e1f92bd82 100644
--- a/client/ticket/src/weekly/index.html
+++ b/client/ticket/src/weekly/index.html
@@ -8,11 +8,6 @@
auto-save="true"
on-save="$ctrl.onSave()">
-