Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
0d5f5cc6 by wurstsalat at 2021-12-11T18:38:43+01:00
Settings: Fix getting type for group chat setting with default
The dict fallback always returned a str, instead of looking up a key value
Fixes #10716
- - - - -
1 changed file:
- gajim/common/settings.py
Changes:
=====================================
gajim/common/settings.py
=====================================
@@ -689,8 +689,9 @@ def set_group_chat_setting(self,
if default is HAS_ACCOUNT_DEFAULT:
default_store = ACCOUNT_SETTINGS['account']
- default = default_store.get(f'gc_{setting}_{context}_default',
- f'gc_{setting}_default')
+ default = default_store.get(f'gc_{setting}_{context}_default')
+ if default is None:
+ default = default_store.get(f'gc_{setting}_default')
if not isinstance(value, type(default)) and value is not None:
raise TypeError(f'Invalid type for {setting}: '
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/0d5f5cc6c63e605b6f4b2beb95f77cdfd6da9fae
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/0d5f5cc6c63e605b6f4b2beb95f77cdfd6da9fae
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