From ba45e4c6d663add769f2cfc8055fe9f844a06898 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Tue, 23 Oct 2018 14:13:36 +0200 Subject: [PATCH] Fixed bug on case of exception on service saving --- server/src/uds/REST/methods/services.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/src/uds/REST/methods/services.py b/server/src/uds/REST/methods/services.py index d6cc03cad..ef2c36205 100644 --- a/server/src/uds/REST/methods/services.py +++ b/server/src/uds/REST/methods/services.py @@ -159,7 +159,8 @@ class Services(DetailHandler): # pylint: disable=too-many-public-methods self._deleteIncompleteService(service) raise RequestError(_('Input error: {0}'.format(unicode(e)))) except Exception as e: - self._deleteIncompleteService(service) + if item is None: + self._deleteIncompleteService(service) logger.exception('Saving Service') raise RequestError('incorrect invocation to PUT: {0}'.format(e))