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:
|
||||
model = Manage
|
||||
fields = ('uuid', 'client', 'note', 'approved', 'prices')
|
||||
fields = ('uuid', 'client', 'note', 'approved', 'prices', 'deleted')
|
||||
read_only_fields = ('note',)
|
||||
|
||||
def get_client(self, obj):
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Reference in New Issue
Block a user