Skip to content

Commit 6544a61

Browse files
committed
fixed deleting element on edition instead of new
1 parent c069f51 commit 6544a61

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

server/src/uds/REST/methods/services.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ def saveItem(self, parent, item):
145145
except IntegrityError: # Duplicate key probably
146146
raise RequestError(_('Element already exists (duplicate key error)'))
147147
except coreService.ValidationException as e:
148-
self._deleteIncompleteService(service)
148+
if item is None:
149+
self._deleteIncompleteService(service)
149150
raise RequestError(_('Input error: {0}'.format(unicode(e))))
150151
except Exception as e:
151152
self._deleteIncompleteService(service)

0 commit comments

Comments
 (0)