Fix delete_lexicon
This commit is contained in:
parent
027933b645
commit
4a49433cde
|
@ -89,9 +89,9 @@ def delete_lexicon(lex, purge=False):
|
||||||
raise ArgumentError("Invalid lexicon: '{}'".format(lex))
|
raise ArgumentError("Invalid lexicon: '{}'".format(lex))
|
||||||
|
|
||||||
# Delete the lexicon from the index
|
# Delete the lexicon from the index
|
||||||
with json_rw('lexicon', 'index.json') as j:
|
with json_rw('lexicon', 'index.json') as index:
|
||||||
if lex.id in j:
|
if lex.name in index:
|
||||||
del j[lex.id]
|
del index[lex.name]
|
||||||
|
|
||||||
# Delete the lexicon data folder if purging
|
# Delete the lexicon data folder if purging
|
||||||
if purge:
|
if purge:
|
||||||
|
|
Loading…
Reference in New Issue