reset model if bad request
This commit is contained in:
@@ -215,6 +215,10 @@ Espo.define('Views.Record.Base', 'View', function (Dep) {
|
||||
}
|
||||
}
|
||||
|
||||
if (xhr.status == 400) {
|
||||
this.model.set(attrsInitialy);
|
||||
}
|
||||
|
||||
if (response) {
|
||||
if (response.reason == 'Duplicate') {
|
||||
xhr.errorIsHandled = true;
|
||||
|
||||
Reference in New Issue
Block a user