mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-10-27 11:30:38 -04:00
case insentive sorting #1087
This commit is contained in:
1 parent
153383343b
commit
0034e49c1a
2 files changed
+3
-1
No files matched your search
Regular → Executable
File mode changed.
@@ -199,7 +199,9 @@ class Query(ObjectType):
|
||||
for sort_option in options.sort:
|
||||
devices_data = sorted(
|
||||
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")
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user