mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-04-15 22:51:37 -07:00
case insentive sorting #1087
This commit is contained in:
Regular → Executable
@@ -199,7 +199,9 @@ class Query(ObjectType):
|
|||||||
for sort_option in options.sort:
|
for sort_option in options.sort:
|
||||||
devices_data = sorted(
|
devices_data = sorted(
|
||||||
devices_data,
|
devices_data,
|
||||||
key=lambda x: mixed_type_sort_key(x.get(sort_option.field)),
|
key=lambda x: mixed_type_sort_key(
|
||||||
|
x.get(sort_option.field).lower() if isinstance(x.get(sort_option.field), str) else x.get(sort_option.field)
|
||||||
|
),
|
||||||
reverse=(sort_option.order.lower() == "desc")
|
reverse=(sort_option.order.lower() == "desc")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user