put unobtainable hats last in hats listing
parent
1e30acc5a8
commit
c5d2bd443b
|
@ -20,7 +20,7 @@ def hats(v:User):
|
|||
else:
|
||||
owned = g.db.query(HatDef, User).join(HatDef.author).filter(HatDef.submitter_id == None, HatDef.id.in_(owned_hat_ids)).order_by(HatDef.price, HatDef.name).all()
|
||||
|
||||
not_owned = g.db.query(HatDef, User).join(HatDef.author).filter(HatDef.submitter_id == None, HatDef.id.notin_(owned_hat_ids)).order_by(HatDef.price, HatDef.name).all()
|
||||
not_owned = g.db.query(HatDef, User).join(HatDef.author).filter(HatDef.submitter_id == None, HatDef.id.notin_(owned_hat_ids)).order_by(HatDef.price == 0, HatDef.price, HatDef.name).all()
|
||||
hats = owned + not_owned
|
||||
|
||||
sales = g.db.query(func.sum(User.coins_spent_on_hats)).scalar()
|
||||
|
|
Loading…
Reference in New Issue