Corrected small description bug in user credentials table

This commit is contained in:
Elijah 2023-12-14 19:38:00 +01:00
parent b76d71c08f
commit 5a2e656536
2 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,17 @@
# Generated by Django 4.2.5 on 2023-12-09 16:51
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('idhub', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='verificablecredential',
name='description',
field=models.TextField(null=True),
),
]

View File

@ -117,6 +117,13 @@ class CredentialsTable(tables.Table):
def render_status(self, record):
return record.get_status()
def order_type(self, queryset, is_descending):
queryset = queryset.order_by(
("-" if is_descending else "") + "schema__type"
)
return (queryset, True)
class Meta:
model = VerificableCredential
template_name = "idhub/custom_table.html"