Commit b6a5affc authored by Lukas Burgey's avatar Lukas Burgey

Fix serializers

parent 55c939c3
...@@ -49,11 +49,6 @@ class NewDeploymentsSerializer(serializers.Serializer): ...@@ -49,11 +49,6 @@ class NewDeploymentsSerializer(serializers.Serializer):
) )
#class SiteSerializer(serializers.Serializer):
# state_items = NewDeploymentStateItemSerializer(many=True)
class RabbitMQInstanceSerializer(serializers.ModelSerializer): class RabbitMQInstanceSerializer(serializers.ModelSerializer):
class Meta: class Meta:
model = models.RabbitMQInstance model = models.RabbitMQInstance
......
...@@ -30,7 +30,6 @@ class ServiceSerializer(serializers.ModelSerializer): ...@@ -30,7 +30,6 @@ class ServiceSerializer(serializers.ModelSerializer):
class NewDeploymentStateItemSerializer(serializers.ModelSerializer): class NewDeploymentStateItemSerializer(serializers.ModelSerializer):
service = ServiceSerializer() service = ServiceSerializer()
#services = ServiceSerializer(many=True)
site = SiteSerializer() site = SiteSerializer()
questionnaire = serializers.JSONField() questionnaire = serializers.JSONField()
credentials = serializers.JSONField() credentials = serializers.JSONField()
...@@ -45,7 +44,6 @@ class NewDeploymentStateItemSerializer(serializers.ModelSerializer): ...@@ -45,7 +44,6 @@ class NewDeploymentStateItemSerializer(serializers.ModelSerializer):
'questionnaire', 'questionnaire',
'credentials', 'credentials',
'service', 'service',
#'services',
'group', 'group',
'message', 'message',
] ]
...@@ -88,12 +86,12 @@ class UserSerializer(serializers.ModelSerializer): ...@@ -88,12 +86,12 @@ class UserSerializer(serializers.ModelSerializer):
# contains properties which change a lot # contains properties which change a lot
class UserStateSerializer(serializers.ModelSerializer): class UserStateSerializer(serializers.ModelSerializer):
deployment_state_items = NewDeploymentStateItemSerializer(many=True) #deployment_state_items = NewDeploymentStateItemSerializer(many=True)
deployments = NewDeploymentSerializer(many=True) deployments = NewDeploymentSerializer(many=True)
class Meta: class Meta:
model = models.User model = models.User
fields = [ fields = [
'deployment_state_items', #'deployment_state_items',
'deployments', 'deployments',
] ]
...@@ -7,7 +7,7 @@ from rest_framework import generics, views ...@@ -7,7 +7,7 @@ from rest_framework import generics, views
from rest_framework.authentication import BasicAuthentication from rest_framework.authentication import BasicAuthentication
from rest_framework.response import Response from rest_framework.response import Response
from ..models.serializers.webpage import NewDeploymentSerializer from ..models.serializers.clients import NewDeploymentSerializer
from ..models.serializers.clients import RabbitMQInstanceSerializer from ..models.serializers.clients import RabbitMQInstanceSerializer
from .. import models from .. import models
......
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