Merge remote-tracking branch 'origin/documentation'
This commit is contained in:
commit
6a8d50ceba
|
@ -24,6 +24,11 @@ class WorkTypeSerializer(serializers.ModelSerializer):
|
|||
validated_data['client'] = self.context['request'].user.client
|
||||
return serializers.ModelSerializer.create(self, validated_data)
|
||||
|
||||
def update(self, instance, validated_data):
|
||||
if 'label' in validated_data:
|
||||
raise serializers.ValidationError("Cannot update field.")
|
||||
return super().update(instance, validated_data)
|
||||
|
||||
class PriceSerializer(serializers.ModelSerializer):
|
||||
get_employee_uuid = serializers.UUIDField(write_only=True)
|
||||
get_work_type_uuid = serializers.UUIDField(write_only=True)
|
||||
|
|
|
@ -88,7 +88,8 @@ 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)
|
||||
return Manage.objects.filter(provider__user__username=self.request.user) \
|
||||
.filter(deleted=False)
|
||||
|
||||
class PriceViewSet(viewsets.ModelViewSet):
|
||||
lookup_field = 'uuid'
|
||||
|
|
|
@ -82,6 +82,8 @@ REST_FRAMEWORK = {
|
|||
|
||||
CORS_ORIGIN_WHITELIST = (
|
||||
'localhost:3000',
|
||||
'caremyway.ca',
|
||||
'www.caremyway.ca',
|
||||
)
|
||||
|
||||
MIDDLEWARE = [
|
||||
|
|
Loading…
Reference in New Issue
Block a user