output annotations in text json
This commit is contained in:
parent
cac92d94f0
commit
4d1f6dc1aa
1 changed files with 2 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue