mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-22 09:36:48 +03:00
Fix a bug in the `Configuration
` provider to correctly handle undefined values
This commit is contained in:
parent
b873137614
commit
d9ff0a01fd
File diff suppressed because it is too large
Load Diff
|
@ -1462,6 +1462,9 @@ cdef class Configuration(Object):
|
|||
keys = selector.split('.')
|
||||
value = self.__call__()
|
||||
|
||||
if value is None:
|
||||
return None
|
||||
|
||||
while len(keys) > 0:
|
||||
key = keys.pop(0)
|
||||
value = value.get(key)
|
||||
|
@ -1507,8 +1510,6 @@ cdef class Configuration(Object):
|
|||
:return: Overriding context.
|
||||
:rtype: :py:class:`OverridingContext`
|
||||
"""
|
||||
if provider is None:
|
||||
provider = {}
|
||||
context = super().override(provider)
|
||||
self.reset_cache()
|
||||
return context
|
||||
|
|
Loading…
Reference in New Issue
Block a user