mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-23 14:32:25 +01:00
parent
0658368aad
commit
e168da4f72
@ -523,7 +523,7 @@ class Package(db.Model):
|
|||||||
def getSortedSupportedGames(self, include_unsupported=False):
|
def getSortedSupportedGames(self, include_unsupported=False):
|
||||||
query = self.supported_games
|
query = self.supported_games
|
||||||
if not include_unsupported:
|
if not include_unsupported:
|
||||||
query = query.filter_by(supports=True)
|
query = query.filter(PackageGameSupport.game.has(state=PackageState.APPROVED)).filter_by(supports=True)
|
||||||
|
|
||||||
supported = query.all()
|
supported = query.all()
|
||||||
supported.sort(key=lambda x: -(x.game.score + 100000*x.confidence))
|
supported.sort(key=lambda x: -(x.game.score + 100000*x.confidence))
|
||||||
|
Loading…
Reference in New Issue
Block a user