From 4d1f6dc1aa08de08b82a16a758efe5db8001e38e Mon Sep 17 00:00:00 2001 From: Sanjay B Date: Sat, 23 Oct 2021 15:45:25 +0530 Subject: [PATCH] output annotations in text json --- app/text/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/text/models.py b/app/text/models.py index cd0700b..4467645 100644 --- a/app/text/models.py +++ b/app/text/models.py @@ -142,5 +142,7 @@ class Text(models.Model): data['title'] = self.title data['byline'] = self.byline data['body'] = self.body + if isinstance(self.annotations, list) and len(self.annotations) > 0: + data['annotations'] = self.annotations data.update(self.data) return json.dumps(data)