Commit 067c15dc by Tim Babych

add str() to item.pk

parent 5341c465
......@@ -48,7 +48,7 @@ class Note(models.Model):
updated = self.updated.isoformat() if self.updated else None
return {
'id': self.pk,
'id': str(self.pk),
'user': self.user_id,
'course_id': self.course_id,
'usage_id': self.usage_id,
......
......@@ -75,7 +75,7 @@ class AnnotationSearchView(APIView):
for item in query:
note_dict = item.get_stored_fields()
note_dict['ranges'] = json.loads(item.ranges)
note_dict['id'] = item.pk
note_dict['id'] = str(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