Commit 8b1ecbb2 by Tim Babych

do output id of the note

parent a31c846d
......@@ -335,7 +335,6 @@ class AnnotationViewTests(BaseAnnotationViewTests):
self._create_annotation(text=u'First one')
self._create_annotation(text=u'Second note')
note = self._create_annotation(text=u'Third note')
del note['id']
del note['created']
del note['updated']
......
......@@ -35,6 +35,7 @@ class AnnotationSearchView(APIView):
for item in query:
note_dict = item.get_stored_fields()
note_dict['ranges'] = json.loads(item.ranges)
note_dict['id'] = int(item.pk)
if params.get('highlight'):
note_dict['text'] = item.highlighted[0]
results.append(note_dict)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment