|
|
@ -132,7 +132,8 @@ class ProjectSerializer(serializers.ModelSerializer): |
|
|
|
class Meta: |
|
|
|
model = Project |
|
|
|
fields = ('id', 'name', 'description', 'guideline', 'users', 'current_users_role', 'project_type', |
|
|
|
'updated_at', 'randomize_document_order', 'collaborative_annotation', 'single_class_classification', 'tags') |
|
|
|
'updated_at', 'randomize_document_order', 'collaborative_annotation', 'single_class_classification', |
|
|
|
'tags') |
|
|
|
read_only_fields = ('updated_at', 'users', 'current_users_role', 'tags') |
|
|
|
|
|
|
|
|
|
|
@ -191,7 +192,6 @@ class ProjectFilteredPrimaryKeyRelatedField(serializers.PrimaryKeyRelatedField): |
|
|
|
|
|
|
|
|
|
|
|
class DocumentAnnotationSerializer(serializers.ModelSerializer): |
|
|
|
# label = ProjectFilteredPrimaryKeyRelatedField(queryset=Label.objects.all()) |
|
|
|
label = serializers.PrimaryKeyRelatedField(queryset=Label.objects.all()) |
|
|
|
document = serializers.PrimaryKeyRelatedField(queryset=Document.objects.all()) |
|
|
|
|
|
|
@ -202,7 +202,6 @@ class DocumentAnnotationSerializer(serializers.ModelSerializer): |
|
|
|
|
|
|
|
|
|
|
|
class SequenceAnnotationSerializer(serializers.ModelSerializer): |
|
|
|
#label = ProjectFilteredPrimaryKeyRelatedField(queryset=Label.objects.all()) |
|
|
|
label = serializers.PrimaryKeyRelatedField(queryset=Label.objects.all()) |
|
|
|
document = serializers.PrimaryKeyRelatedField(queryset=Document.objects.all()) |
|
|
|
|
|
|
|