forked from shaba/openuds
fixed deletion of service on validation error
This commit is contained in:
parent
1aad0c85a4
commit
31e6e01cad
@ -150,7 +150,7 @@ class Services(DetailHandler): # pylint: disable=too-many-public-methods
|
||||
except IntegrityError: # Duplicate key probably
|
||||
raise RequestError(_('Element already exists (duplicate key error)'))
|
||||
except coreService.ValidationException as e:
|
||||
if item is None:
|
||||
if item is None: # Only remove partially saved element if creating new (if editing, ignore this)
|
||||
self._deleteIncompleteService(service)
|
||||
raise RequestError(_('Input error: {0}'.format(unicode(e))))
|
||||
except Exception as e:
|
||||
|
Loading…
Reference in New Issue
Block a user