Commit 534df044 authored by John Red Medrano's avatar John Red Medrano

Merge branch 'RMSv2' of http://42.61.118.105:7990/scm/rms/api-main-service into red-develop

parents dfbe1cfd b15a945d
......@@ -36,12 +36,15 @@ class ChangeRequestFormAttachmentsFileUploadSerializer(
class Meta:
model = models.ChangeRequestFormAttachments
fields = (
'id',
'code',
'attachment_type',
'attachment_name',
'file_name',
'description',
'file_upload',
'uploaded_by',
'form_code'
'form_code',
'created'
)
# read_only_fields = ['created', 'code']
\ No newline at end of file
read_only_fields = ['id,', 'created', 'code']
\ No newline at end of file
......@@ -1294,11 +1294,18 @@ class ChangeRequestFormsViewset(viewsets.ModelViewSet):
id_number
)
self.queryset = models.ChangeRequestFormAttachments.objects.filter(
form_code=form_code
)
self.serializer_class = ChangeRequestFormAttachmentsFileUploadSerializer
serializer = self.get_serializer(self.queryset, many=True)
message = status_message_response(
200, 'success',
'Attachments successfully updated!',
''
serializer.data
)
return Response(message, status=status.HTTP_200_OK)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment