From 91e0f588e591c4dcf9f6a11b0e4e867377757798 Mon Sep 17 00:00:00 2001 From: j Date: Thu, 14 Jun 2018 19:27:40 +0200 Subject: [PATCH] only append to documentKeys after adding defaults --- pandora/app/config.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pandora/app/config.py b/pandora/app/config.py index ee8ef916b..cb2695150 100644 --- a/pandora/app/config.py +++ b/pandora/app/config.py @@ -95,15 +95,6 @@ def load_config(init=False): for key in config['itemKeys']: config['keys'][key['id']] = key - # add entities if needed - if len(config.get('entities', [])) and not [k for k in config['documentKeys'] if k['id'] == 'entites']: - config['documentKeys'].append({ - 'id': 'entity', - 'title': 'Entity', - 'type': 'string', - 'find': True - }) - # add missing defaults for section in sorted(( 'capabilities', 'cantPlay', @@ -140,6 +131,15 @@ def load_config(init=False): sys.stderr.write("adding default %s:\n\t" % section) sys.stderr.write("\n\t".join(added) + '\n\n') + # add entities if needed + if len(config.get('entities', [])) and not [k for k in config['documentKeys'] if k['id'] == 'entites']: + config['documentKeys'].append({ + 'id': 'entity', + 'title': 'Entity', + 'type': 'string', + 'find': True + }) + key = 'documentRightsLevel' if key not in config: config[key] = {}