From 581d927a229a632e91ec4625ead4f54cf34adeed Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sat, 29 Nov 2014 14:16:53 +0100 Subject: [PATCH] value can be capability --- pandora/item/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pandora/item/models.py b/pandora/item/models.py index d3f3457e..c8c599bc 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -195,6 +195,7 @@ class Item(models.Model): return self.external_data[key] item_key = utils.get_by_id(settings.CONFIG['itemKeys'], key) if item_key and 'value' in item_key \ + and isinstance(item_key['value'], dict) \ and item_key['value'].get('type') == 'map' \ and self.get(item_key['value']['key']): value = re.compile(item_key['value']['map']).findall(self.get(item_key['value']['key']))