Refactor conditional to pass required setting tests.
If a setting is defined in a subclass and is not None do not raise config error.
This commit is contained in:
parent
86fddf8e22
commit
c30365338b
@ -33,8 +33,10 @@ class SettingsBaseMeta(type):
|
||||
# required anymore.
|
||||
for base in inspect.getmro(cls):
|
||||
for r in list(required):
|
||||
if hasattr(base, r) and getattr(base, r) != getattr(cls, r):
|
||||
if hasattr(base, r) and getattr(base, r) != getattr(cls, r) \
|
||||
or hasattr(cls, r) and getattr(cls, r) is not None:
|
||||
required.remove(r)
|
||||
|
||||
return unique(settings), required
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user