Skip to content

Commit

Permalink
make sure a components name is always set in the config
Browse files Browse the repository at this point in the history
  • Loading branch information
tmbo committed May 28, 2018
1 parent 17ad5ce commit be30091
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rasa_nlu/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@ class Component(object):
language_list = None

def __init__(self, component_config=None):
# makes sure the name of the configuration is part of the config
# this is important for e.g. persistence
component_config["name"] = self.name

self.component_config = config.override_defaults(
self.defaults, component_config)

Expand Down

0 comments on commit be30091

Please sign in to comment.