python3: use key function to sort categories (#39092)
This commit is contained in:
parent
a8e12b9630
commit
b562bef51f
|
@ -100,7 +100,7 @@ def get_wcs_options(url, condition=None, params={}):
|
|||
categories[category_key].append((reference, title))
|
||||
options = []
|
||||
for category in sorted(categories.keys()):
|
||||
options.append((category, sorted(categories[category], lambda x, y: cmp(x[1], y[1]))))
|
||||
options.append((category, sorted(categories[category], key=lambda x: x[1])))
|
||||
return options
|
||||
|
||||
def get_wcs_formdef_details(formdef_reference):
|
||||
|
|
Loading…
Reference in New Issue