Run game support update_all on unapproved mods too

This commit is contained in:
rubenwardy 2022-02-02 00:25:28 +00:00
parent b8d95dd222
commit d098ee9dff
2 changed files with 4 additions and 3 deletions

@ -134,7 +134,7 @@ class GameSupportResolver:
return retval
def update_all(self) -> None:
for package in Package.query.filter_by(type=PackageType.MOD, state=PackageState.APPROVED).all():
for package in Package.query.filter(Package.type == PackageType.MOD, Package.state != PackageState.DELETED).all():
retval = self.resolve(package, [])
for game in retval:
support = PackageGameSupport(package, game)

@ -116,8 +116,9 @@ def postReleaseCheckUpdate(self, release: PackageRelease, path):
db.session.add(Dependency(package, meta=meta, optional=True))
# Update game supports
resolver = GameSupportResolver()
resolver.update(package)
if package.type == PackageType.MOD:
resolver = GameSupportResolver()
resolver.update(package)
# Update min/max
if tree.meta.get("min_minetest_version"):