This commit is contained in:
Vicent Llopis 2023-01-05 10:35:42 +01:00
parent 9ae7b92bbf
commit 3edc0403ba
1 changed files with 2 additions and 3 deletions

View File

@ -178,7 +178,7 @@ export default class CrudModel extends ModelProxy {
}
}
let changes = {deletes, updates, creates};
const changes = {deletes, updates, creates};
for (let prop in changes) {
if (changes[prop].length === 0)
@ -198,8 +198,7 @@ export default class CrudModel extends ModelProxy {
const changes = this.getChanges();
if (!changes) return this.$q.resolve();
const creates = changes.creates;
const creates = changes.creates || [];
let url = this.saveUrl ? this.saveUrl : `${this._url}/crud`;
return this.$http.post(url, changes)
.then(res => {