diff --git a/api/views/counter.py b/api/views/counter.py index 6c34029a..69a98660 100644 --- a/api/views/counter.py +++ b/api/views/counter.py @@ -11,12 +11,14 @@ class CounterSerializer(serializers.ModelSerializer): is_open = serializers.BooleanField(read_only=True) barman_list = serializers.ListField( - child=serializers.IntegerField() + child=serializers.IntegerField(), + read_only=True ) class Meta: model = Counter - fields = ('id', 'name', 'type', 'is_open', 'barman_list') + fields = ('id', 'name', 'type', 'club', + 'products', 'is_open', 'barman_list') class CounterViewSet(RightModelViewSet): diff --git a/api/views/launderette.py b/api/views/launderette.py index a2423c17..c3e586c0 100644 --- a/api/views/launderette.py +++ b/api/views/launderette.py @@ -9,10 +9,12 @@ from api.views import RightModelViewSet class LaunderettePlaceSerializer(serializers.ModelSerializer): machine_list = serializers.ListField( - child=serializers.IntegerField() + child=serializers.IntegerField(), + read_only=True ) token_list = serializers.ListField( - child=serializers.IntegerField() + child=serializers.IntegerField(), + read_only=True ) class Meta: @@ -24,7 +26,7 @@ class LaunderetteMachineSerializer(serializers.ModelSerializer): class Meta: model = Machine - fields = ('id', 'name', 'is_working', 'launderette') + fields = ('id', 'name', 'type', 'is_working', 'launderette') class LaunderetteTokenSerializer(serializers.ModelSerializer):