Unnecessary to pass both root and model factory

This commit is contained in:
Tim Van Baak 2020-04-24 10:53:19 -07:00
parent 6d0aa3eb34
commit 9252e524ae
2 changed files with 2 additions and 2 deletions

View File

@ -43,7 +43,7 @@ def command_create(args):
return -1
# Perform command
create_lexicon(root, args.model_factory, args.name, args.user)
create_lexicon(root, args.name, args.user)
# Output already logged by create_lexicon
return 0

View File

@ -28,7 +28,6 @@ def valid_name(name: str) -> bool:
def create_lexicon(
root: RootConfigDirectoryContext,
model_factory: ModelFactory,
name: str,
editor: UserModel) -> LexiconModel:
"""
@ -74,6 +73,7 @@ def create_lexicon(
pass # Create an empry config file
# Load the lexicon and add the editor and default character
model_factory: ModelFactory = ModelFactory(root)
lexicon = model_factory.lexicon(lid)
with lexicon.ctx.edit_config() as cfg:
cfg.join.joined.append(editor.uid)