Workaround for breaking changes before 2.0

This commit is contained in:
kramo
2023-05-20 09:34:44 +02:00
parent d060c4feca
commit 7b34b53a3a

View File

@@ -139,6 +139,13 @@ class Game(Gtk.Box):
"blacklisted",
)
# TODO: remove for 2.0
attrs = list(attrs)
if not self.removed:
attrs.remove("removed")
if not self.blacklisted:
attrs.remove("blacklisted")
json.dump(
{attr: getattr(self, attr) for attr in attrs if attr},
(self.win.games_dir / f"{self.game_id}.json").open("w"),