From 3b475bf832c76e98bee1841210a40ce238578063 Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Sun, 21 Jan 2018 23:39:40 +0000 Subject: [PATCH] Inform employment deletion by field instead of by hiding --- caremyway/api/serializers.py | 2 +- caremyway/api/views.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/caremyway/api/serializers.py b/caremyway/api/serializers.py index ffcba6d..0a540e2 100644 --- a/caremyway/api/serializers.py +++ b/caremyway/api/serializers.py @@ -141,7 +141,7 @@ class EmployerSerializer(serializers.ModelSerializer): class Meta: model = Manage - fields = ('uuid', 'client', 'note', 'approved', 'prices') + fields = ('uuid', 'client', 'note', 'approved', 'prices', 'deleted') read_only_fields = ('note',) def get_client(self, obj): diff --git a/caremyway/api/views.py b/caremyway/api/views.py index 776527b..ee1691d 100644 --- a/caremyway/api/views.py +++ b/caremyway/api/views.py @@ -88,8 +88,7 @@ class EmployerViewSet(viewsets.ModelViewSet): http_method_names = ['get', 'head', 'put', 'options'] def get_queryset(self): - return Manage.objects.filter(provider__user__username=self.request.user) \ - .filter(deleted=False) + return Manage.objects.filter(provider__user__username=self.request.user) class PriceViewSet(viewsets.ModelViewSet): lookup_field = 'uuid'