Don't load protections from config if strategy defines a property

This commit is contained in:
Matthias
2021-06-17 21:01:22 +02:00
parent 8562e19776
commit e1010ff592
6 changed files with 9 additions and 8 deletions

View File

@@ -113,7 +113,9 @@ class StrategyResolver(IResolver):
- Strategy
- default (if not None)
"""
if attribute in config:
if (attribute in config
and not isinstance(getattr(type(strategy), 'my_property', None), property)):
# Ensure Properties are not overwritten
setattr(strategy, attribute, config[attribute])
logger.info("Override strategy '%s' with value in config file: %s.",
attribute, config[attribute])