Philipp Hörist pushed to branch master at gajim / gajim
Commits:
f0bc96b7 by Philipp Hörist at 2022-10-19T21:41:01+02:00
cfix: Settings: Add migration for changed account setting
- - - - -
1 changed file:
- gajim/common/settings.py
Changes:
=====================================
gajim/common/settings.py
=====================================
@@ -81,7 +81,7 @@
log = logging.getLogger('gajim.c.settings')
-CURRENT_USER_VERSION = 2
+CURRENT_USER_VERSION = 3
CREATE_SQL = '''
CREATE TABLE settings (
@@ -340,6 +340,14 @@ def _migrate(self) -> None:
self._set_user_version(2)
+ if version < 3:
+ # Migrate open chats to new key and format
+ for account_settings in self._account_settings.values():
+ if account_settings['account'].get('active') is None:
+ account_settings['account']['active'] = True
+
+ self._set_user_version(3)
+
def _migrate_old_config(self) -> None:
config_file = configpaths.get('CONFIG_FILE')
if not config_file.exists():
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/f0bc96b7f7a026966cb9692895ef5e2ab20e76ef
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/f0bc96b7f7a026966cb9692895ef5e2ab20e76ef
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits