forked from SilverStudioGames/WTS
Sort in-place to save time
(cherry picked from commit 36d3a5d1a79827a2c0f718fdf4124f61109a346c)
This commit is contained in:
parent
780c028eb3
commit
f1a0c779f6
@ -4,9 +4,9 @@ init python:
|
||||
item = sorted(item, key=lambda x: natsort_key(x.name))
|
||||
|
||||
if sortby == "Price (Asc)":
|
||||
item = sorted(item, key=lambda x: x.price, reverse=False)
|
||||
item.sort(key=lambda x: x.price, reverse=False)
|
||||
elif current_sorting == "Price (Desc)":
|
||||
item = sorted(item, key=lambda x: x.price, reverse=True)
|
||||
item.sort(key=lambda x: x.price, reverse=True)
|
||||
return item
|
||||
|
||||
label shop_item:
|
||||
|
Loading…
Reference in New Issue
Block a user