mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-26 02:54:20 +00:00
Fixed api's list bug
This commit is contained in:
parent
6c107ed3d4
commit
2f7030d964
@ -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
|
|||||||
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):
|
|||||||
|
|
||||||
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):
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user