From 9a60d63da1602b984287ca901d01fac53dece858 Mon Sep 17 00:00:00 2001
From: "robinwilliam.hundt" <robinwilliam.hundt@stud.uni-goettingen.de>
Date: Tue, 20 Feb 2018 23:31:04 +0100
Subject: [PATCH] Changed SubmissionAssignmentSerializer `type_pk` to `type`

Uniform naming makes Frontend life easier
---
 core/serializers/subscription.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/core/serializers/subscription.py b/core/serializers/subscription.py
index 6509c754..075363b5 100644
--- a/core/serializers/subscription.py
+++ b/core/serializers/subscription.py
@@ -8,13 +8,13 @@ from core.serializers import (DynamicFieldsModelSerializer, FeedbackSerializer,
 
 class SubmissionAssignmentSerializer(DynamicFieldsModelSerializer):
     text = serializers.ReadOnlyField()
-    type_pk = serializers.ReadOnlyField(source='type.pk')
+    type = serializers.ReadOnlyField(source='type.pk')
     full_score = serializers.ReadOnlyField(source='type.full_score')
     tests = TestSerializer(many=True, read_only=True)
 
     class Meta:
         model = Submission
-        fields = ('pk', 'type_pk', 'text', 'full_score', 'tests')
+        fields = ('pk', 'type', 'text', 'full_score', 'tests')
 
 
 class AssignmentSerializer(DynamicFieldsModelSerializer):
-- 
GitLab