forked from shaba/openuds
Merge remote-tracking branch 'origin/v3.0'
This commit is contained in:
commit
f69a9dbc82
@ -183,7 +183,7 @@ class Services(DetailHandler): # pylint: disable=too-many-public-methods
|
|||||||
except models.Service.DoesNotExist:
|
except models.Service.DoesNotExist:
|
||||||
raise self.invalidItemException()
|
raise self.invalidItemException()
|
||||||
except IntegrityError: # Duplicate key probably
|
except IntegrityError: # Duplicate key probably
|
||||||
if service and service.token:
|
if service and service.token and not item:
|
||||||
service.delete()
|
service.delete()
|
||||||
raise RequestError(_('Service token seems to be in use by other service. Please, select a new one.'))
|
raise RequestError(_('Service token seems to be in use by other service. Please, select a new one.'))
|
||||||
raise RequestError(_('Element already exists (duplicate key error)'))
|
raise RequestError(_('Element already exists (duplicate key error)'))
|
||||||
|
Loading…
Reference in New Issue
Block a user