Inform employment deletion by field instead of by hiding
This commit is contained in:
parent
58d897113f
commit
3b475bf832
|
@ -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):
|
||||||
|
|
|
@ -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'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user