Skip to content

Commit

Permalink
11383 fix search order (#12251)
Browse files Browse the repository at this point in the history
* Fixes #11383: Sorting search by type doesn't work

* Fixes #11383: Sorting search by type doesn't work; more reliable approach
  • Loading branch information
decoupca authored Apr 20, 2023
1 parent ab35315 commit 8b7ee0a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion netbox/netbox/tables/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,8 @@ def __init__(self, *args, extra_columns=None, **kwargs):

class SearchTable(tables.Table):
object_type = columns.ContentTypeColumn(
verbose_name=_('Type')
verbose_name=_('Type'),
order_by="object___meta__verbose_name",
)
object = tables.Column(
linkify=True
Expand Down

0 comments on commit 8b7ee0a

Please sign in to comment.