Reformat restaurant to name
This commit is contained in:
parent
809b5ccab7
commit
dd49ee7b6c
|
|
@ -531,7 +531,7 @@ class EstablishmentAdminListSerializer(UserShortSerializer):
|
|||
class EstablishmentEmployeeListSerializer(serializers.ModelSerializer):
|
||||
"""Establishments from employee serializer"""
|
||||
|
||||
restaurant = EstablishmentListCreateSerializer(read_only=True, source='establishment')
|
||||
restaurant_name = serializers.CharField(read_only=True, source='establishment.name')
|
||||
position = PositionBackSerializer(read_only=True)
|
||||
state = serializers.CharField(read_only=True, source='status')
|
||||
start = serializers.DateTimeField(read_only=True, source='from_date')
|
||||
|
|
@ -540,7 +540,7 @@ class EstablishmentEmployeeListSerializer(serializers.ModelSerializer):
|
|||
class Meta:
|
||||
model = models.EstablishmentEmployee
|
||||
fields = [
|
||||
'restaurant',
|
||||
'restaurant_name',
|
||||
'position',
|
||||
'state',
|
||||
'start',
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user