From 4a49433cde1434a71c3751dd562928de909e82fc Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Wed, 29 Jan 2020 14:35:33 -0800 Subject: [PATCH] Fix delete_lexicon --- amanuensis/lexicon/manage.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/amanuensis/lexicon/manage.py b/amanuensis/lexicon/manage.py index f403e45..e927578 100644 --- a/amanuensis/lexicon/manage.py +++ b/amanuensis/lexicon/manage.py @@ -89,9 +89,9 @@ def delete_lexicon(lex, purge=False): raise ArgumentError("Invalid lexicon: '{}'".format(lex)) # Delete the lexicon from the index - with json_rw('lexicon', 'index.json') as j: - if lex.id in j: - del j[lex.id] + with json_rw('lexicon', 'index.json') as index: + if lex.name in index: + del index[lex.name] # Delete the lexicon data folder if purging if purge: