From 6603c046bc65076f59ff28b81d9620aab2c8e2be Mon Sep 17 00:00:00 2001 From: konrad Date: Sun, 3 Mar 2019 21:07:15 +0000 Subject: [PATCH] Fix for task dates update (#23) --- src/services/abstractService.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/services/abstractService.js b/src/services/abstractService.js index 9e85ad1f..4f240288 100644 --- a/src/services/abstractService.js +++ b/src/services/abstractService.js @@ -207,9 +207,9 @@ export default class AbstractService { * @param model * @return {*} */ - beforeUpdate(model) { +/* beforeUpdate(model) { return model - } + }*/ /** * Default preprocessor for delete requests @@ -315,7 +315,9 @@ export default class AbstractService { } const cancel = this.setLoading() - model = this.beforeUpdate(model) + if(typeof this.beforeUpdate === 'function') { + model = this.beforeUpdate(model) + } return this.http.post(this.getReplacedRoute(this.paths.update, model), model) .catch(error => { return this.errorHandler(error)