forked from enviPath/enviPy
minor
This commit is contained in:
@ -254,7 +254,15 @@ class Classifier(Plugin):
|
||||
def parse_config(cls, data: dict | None = None) -> EnviPyModel | None:
|
||||
if cls.Config is None:
|
||||
return None
|
||||
return cls.Config(**(data or {}))
|
||||
|
||||
# remove empty strings a.k.a unset params to not overwrite defaults
|
||||
cpy = {}
|
||||
if data is not None:
|
||||
for k, v in data.items():
|
||||
if v != "":
|
||||
cpy[k] = v
|
||||
|
||||
return cls.Config(**cpy)
|
||||
|
||||
@classmethod
|
||||
def create(cls, data: dict | None = None):
|
||||
|
||||
Reference in New Issue
Block a user