From 9ef306ab53ecebdeb8e8f087a053a5f122f1d0f1 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 23 Sep 2016 22:58:19 +0200 Subject: [PATCH] support getting related items --- pandora/document/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandora/document/models.py b/pandora/document/models.py index 601ee5f66..54bb30d01 100644 --- a/pandora/document/models.py +++ b/pandora/document/models.py @@ -173,6 +173,8 @@ class Document(models.Model): entity_json = dp.entity.json(['id', 'type', 'name']) entity_json['data'] = dp.data entity_jsons.append(entity_json) + elif key == 'items': + response[key] = [i['public_id'] for i in self.items.all().values('public_id')] elif hasattr(self, _map.get(key, key)): response[key] = getattr(self, _map.get(key,key)) or '' if item: