Commit 39bcdae5 authored by Lukas Burgey's avatar Lukas Burgey
Browse files

Add missing field to serializer

parent 3b116b81
......@@ -5,6 +5,12 @@ from .. import models
from ..frontend import serializers as frontend_serializers
class ServiceSerializer(serializers.ModelSerializer):
class Meta:
model = models.Service
fields = ['name']
class UserSerializer(serializers.ModelSerializer):
groups = frontend_serializers.GroupSerializer(many=True)
......@@ -17,13 +23,14 @@ class UserSerializer(serializers.ModelSerializer):
class DeploymentSerializer(serializers.ModelSerializer):
user = UserSerializer()
service = ServiceSerializer()
ssh_keys = frontend_serializers.SSHPublicKeySerializer(many=True)
ssh_keys_to_withdraw = frontend_serializers.SSHPublicKeySerializer(
many=True)
class Meta:
model = models.Deployment
fields = ['user', 'ssh_keys', 'ssh_keys_to_withdraw']
fields = ['user', 'service', 'ssh_keys', 'ssh_keys_to_withdraw']
class DeploymentsSerializer(serializers.Serializer):
......@@ -32,9 +39,3 @@ class DeploymentsSerializer(serializers.Serializer):
child=DeploymentSerializer()
)
)
class ServiceSerializer(serializers.ModelSerializer):
class Meta:
model = models.Service
fields = ['name']
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