Fixed bug on case of exception on service saving

This commit is contained in:
Adolfo Gómez García 2018-10-23 14:13:36 +02:00
parent 8088efa225
commit ba45e4c6d6

View File

@ -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))