dont fail if clipLayers is missing
This commit is contained in:
parent
513e79b431
commit
9da8c75f70
3 changed files with 3 additions and 3 deletions
|
|
@ -37,7 +37,7 @@ def parseCondition(condition, user):
|
|||
op = condition.get('operator')
|
||||
if not op:
|
||||
op = ''
|
||||
if k in settings.CONFIG['clipLayers']:
|
||||
if k in settings.CONFIG.get('clipLayers', []):
|
||||
return parseCondition({'key': 'annotations__findvalue',
|
||||
'value': v,
|
||||
'operator': op}, user) \
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ class MetaClip:
|
|||
if self.id:
|
||||
sortvalue = ''
|
||||
if self.id:
|
||||
for l in settings.CONFIG['clipLayers']:
|
||||
for l in settings.CONFIG.get('clipLayers', []):
|
||||
sortvalue += ''.join(filter(lambda s: s,
|
||||
[a.sortvalue
|
||||
for a in self.annotations.filter(layer=l).order_by('sortvalue')]))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue