Browse Source

Fix bug: change serializer field name

pull/10/head
Hironsan 6 years ago
parent
commit
623f24cbf9
2 changed files with 2 additions and 2 deletions
  1. BIN
      app/db.sqlite3
  2. 4
      app/server/serializers.py

BIN
app/db.sqlite3

4
app/server/serializers.py

@ -20,11 +20,11 @@ class DocumentAnnotationSerializer(serializers.ModelSerializer):
class DocumentSerializer(serializers.ModelSerializer): class DocumentSerializer(serializers.ModelSerializer):
labels = DocumentAnnotationSerializer(many=True)
doc_annotations = DocumentAnnotationSerializer(many=True)
class Meta: class Meta:
model = Document model = Document
fields = ('id', 'text', 'labels')
fields = ('id', 'text', 'doc_annotations')
class ProjectSerializer(serializers.ModelSerializer): class ProjectSerializer(serializers.ModelSerializer):

Loading…
Cancel
Save