Commit 585665c8 authored by John Red Medrano's avatar John Red Medrano

fixing

parent 4388b4dd
......@@ -16,7 +16,7 @@ from app.applicationlayer.cms.template.stakeholder.serializers import ChangeRequ
class ChangeRequestTemplateAttachmentsSerializer(
serializers.ModelSerializer
):
file_upload = serializers.HyperlinkedRelatedField(queryset=models.MasterAttachment.objects.all(), view_name='MasterAttachment.id')
# file_upload = serializers.HyperlinkedRelatedField(queryset=models.MasterAttachment.objects.all(), view_name='MasterAttachment.id')
def to_representation(self, instance):
# try:
......@@ -38,18 +38,19 @@ class ChangeRequestTemplateAttachmentsSerializer(
class Meta:
model = models.ChangeRequestTemplateAttachments
fields = (
"id",
"attachment_type",
"attachment_name",
"file_name",
"description",
"created",
"code",
"uploaded_by",
"file_upload",
"template_no"
)
# fields = (
# "id",
# "attachment_type",
# "attachment_name",
# "file_name",
# "description",
# "created",
# "code",
# "uploaded_by",
# "file_upload",
# "template_no"
# )
fields = '__all__'
read_only_fields = ['created', 'code']
......
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