mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-22 22:12:24 +01:00
Fix crash on manual game support override
This commit is contained in:
parent
2c0d90e797
commit
434fd03fe8
@ -343,7 +343,11 @@ def game_support_set(session, package: Package, game_is_supported: Dict[int, boo
|
||||
game = session.query(Package).get(game_id)
|
||||
lookup = previous_supported.pop(game_id, None)
|
||||
if lookup is None:
|
||||
support = PackageGameSupport(package, game, confidence, supports)
|
||||
support = PackageGameSupport()
|
||||
support.package = package
|
||||
support.game = game
|
||||
support.confidence = confidence
|
||||
support.supports = supports
|
||||
session.add(support)
|
||||
elif lookup.confidence <= confidence:
|
||||
lookup.supports = supports
|
||||
|
Loading…
Reference in New Issue
Block a user