mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-23 07:23:46 +00:00
rebase
This commit is contained in:
parent
01d9a1a596
commit
de4484625f
2 changed files with 230 additions and 225 deletions
File diff suppressed because it is too large
Load diff
|
@ -663,13 +663,17 @@ def del_extension(request, instances):
|
||||||
try:
|
try:
|
||||||
extension_del.delete()
|
extension_del.delete()
|
||||||
messages.success(request, _("The extension was deleted."))
|
messages.success(request, _("The extension was deleted."))
|
||||||
except ProtectedError:
|
except ProtectedError as e:
|
||||||
messages.error(
|
messages.error(
|
||||||
request,
|
request,
|
||||||
(
|
(
|
||||||
_(
|
_(
|
||||||
"The extension %s is assigned to at least one machine"
|
"The extension %s is assigned to following %s : %s"
|
||||||
" type, you can't delete it." % extension_del
|
", you can't delete it."
|
||||||
|
) % (
|
||||||
|
extension_del,
|
||||||
|
str(e.protected_objects.model._meta.verbose_name_plural),
|
||||||
|
",".join(map(lambda x: str(x['name']), e.protected_objects.values('name').iterator()))
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue