Commit 2f7030d9 authored by Sli's avatar Sli
Browse files

Fixed api's list bug

parent 6c107ed3
Pipeline #126 failed with stage
in 2 minutes and 55 seconds
...@@ -11,12 +11,14 @@ class CounterSerializer(serializers.ModelSerializer): ...@@ -11,12 +11,14 @@ class CounterSerializer(serializers.ModelSerializer):
is_open = serializers.BooleanField(read_only=True) is_open = serializers.BooleanField(read_only=True)
barman_list = serializers.ListField( barman_list = serializers.ListField(
child=serializers.IntegerField() child=serializers.IntegerField(),
read_only=True
) )
class Meta: class Meta:
model = Counter model = Counter
fields = ('id', 'name', 'type', 'is_open', 'barman_list') fields = ('id', 'name', 'type', 'club',
'products', 'is_open', 'barman_list')
class CounterViewSet(RightModelViewSet): class CounterViewSet(RightModelViewSet):
......
...@@ -9,10 +9,12 @@ from api.views import RightModelViewSet ...@@ -9,10 +9,12 @@ from api.views import RightModelViewSet
class LaunderettePlaceSerializer(serializers.ModelSerializer): class LaunderettePlaceSerializer(serializers.ModelSerializer):
machine_list = serializers.ListField( machine_list = serializers.ListField(
child=serializers.IntegerField() child=serializers.IntegerField(),
read_only=True
) )
token_list = serializers.ListField( token_list = serializers.ListField(
child=serializers.IntegerField() child=serializers.IntegerField(),
read_only=True
) )
class Meta: class Meta:
...@@ -24,7 +26,7 @@ class LaunderetteMachineSerializer(serializers.ModelSerializer): ...@@ -24,7 +26,7 @@ class LaunderetteMachineSerializer(serializers.ModelSerializer):
class Meta: class Meta:
model = Machine model = Machine
fields = ('id', 'name', 'is_working', 'launderette') fields = ('id', 'name', 'type', 'is_working', 'launderette')
class LaunderetteTokenSerializer(serializers.ModelSerializer): class LaunderetteTokenSerializer(serializers.ModelSerializer):
......
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