From 85c066ff144999e0d47ded68b75105a9ae9b3138 Mon Sep 17 00:00:00 2001 From: Marcel Vriend <92307684+marcelvriend@users.noreply.github.com> Date: Thu, 28 Jul 2022 06:52:37 +0200 Subject: [PATCH 1/2] Fix enabled features lookup (#248) --- pygrocy/data_models/system.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pygrocy/data_models/system.py b/pygrocy/data_models/system.py index 1471b1b..2b70c27 100644 --- a/pygrocy/data_models/system.py +++ b/pygrocy/data_models/system.py @@ -78,10 +78,12 @@ def __init__(self, system_config_dto: SystemConfigDto): self._locale = system_config_dto.locale self._currency = system_config_dto.currency - self._enabled_features = [] - for feature, value in system_config_dto.feature_flags.items(): - if bool(value): - self._enabled_features.append(feature) + self._enabled_features = [ + feature + for feature, value in system_config_dto.feature_flags.items() + if value + not in (False, "0") # The default is enabled, disabled can be False or "0" + ] @property def username(self) -> str: From 594666b6a52129589570e2ee25331d6be63e8976 Mon Sep 17 00:00:00 2001 From: Sebastian Rutofski Date: Thu, 28 Jul 2022 06:54:30 +0200 Subject: [PATCH 2/2] 1.4.1 prep --- CHANGELOG.md | 8 ++++++++ setup.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef0aee4..f65f083 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [v1.4.1](https://github.com/SebRut/pygrocy/tree/v1.4.1) (2022-07-28) + +[Full Changelog](https://github.com/SebRut/pygrocy/compare/v1.4.0...v1.4.1) + +**Merged pull requests:** + +- Fix enabled features lookup [\#248](https://github.com/SebRut/pygrocy/pull/248) ([marcelvriend](https://github.com/marcelvriend)) + ## [v1.4.0](https://github.com/SebRut/pygrocy/tree/v1.4.0) (2022-07-24) [Full Changelog](https://github.com/SebRut/pygrocy/compare/v1.3.0...v1.4.0) diff --git a/setup.py b/setup.py index c48e183..253dda9 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="pygrocy", - version="1.4.0", + version="1.4.1", author="Sebastian Rutofski", author_email="kontakt@sebastian-rutofski.de", description="",