Skip to content

Commit

Permalink
fix(tables): sort date column in Instance list view
Browse files Browse the repository at this point in the history
using the hidden date field
  • Loading branch information
gythaogg committed Feb 4, 2025
1 parent acdedeb commit 05bae81
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apis_ontology/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,10 @@ def render_availability(self, value):
symbol = "check"
return mark_safe(f'<span class="material-symbols-outlined">{symbol}</span>')

def order_start_date_written(self, queryset, is_descending):
queryset = queryset.order_by(("-" if is_descending else "") + "start_date")
return queryset, True

author = AuthorColumn(verbose_name="Author", accessor="work_id", orderable=True)


Expand Down

0 comments on commit 05bae81

Please sign in to comment.