From 156b0b4586924334e5592e52336aa975def8a488 Mon Sep 17 00:00:00 2001 From: Elijah Date: Thu, 29 Feb 2024 18:23:56 +0100 Subject: [PATCH] Emitted credentials won't show as available to be deleted --- idhub/admin/tables.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/idhub/admin/tables.py b/idhub/admin/tables.py index 74dcc6f..0fcb58e 100644 --- a/idhub/admin/tables.py +++ b/idhub/admin/tables.py @@ -253,6 +253,12 @@ class TemplateTable(tables.Table): return (queryset, True) + def render_delete_schema(self, value, record): + if record.has_credentials(): + return value + else: + return "" + class Meta: model = Schemas template_name = "idhub/custom_table.html"