Inform employment deletion by field instead of by hiding

This commit is contained in:
Tanner Collin 2018-01-21 23:39:40 +00:00
parent 58d897113f
commit 3b475bf832
2 changed files with 2 additions and 3 deletions

View File

@ -141,7 +141,7 @@ class EmployerSerializer(serializers.ModelSerializer):
class Meta: class Meta:
model = Manage model = Manage
fields = ('uuid', 'client', 'note', 'approved', 'prices') fields = ('uuid', 'client', 'note', 'approved', 'prices', 'deleted')
read_only_fields = ('note',) read_only_fields = ('note',)
def get_client(self, obj): def get_client(self, obj):

View File

@ -88,8 +88,7 @@ class EmployerViewSet(viewsets.ModelViewSet):
http_method_names = ['get', 'head', 'put', 'options'] http_method_names = ['get', 'head', 'put', 'options']
def get_queryset(self): def get_queryset(self):
return Manage.objects.filter(provider__user__username=self.request.user) \ return Manage.objects.filter(provider__user__username=self.request.user)
.filter(deleted=False)
class PriceViewSet(viewsets.ModelViewSet): class PriceViewSet(viewsets.ModelViewSet):
lookup_field = 'uuid' lookup_field = 'uuid'