Merge pull request #153 from CDC-IITDH/gowtham/minor-fix-contributors-api

minor fix to contributors api
This commit is contained in:
karthik mv 2023-05-30 14:53:14 +05:30 committed by GitHub
commit aef682ec1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -162,7 +162,8 @@ class PlacementApplicationSerializer(serializers.ModelSerializer):
return data return data
def get_resume_link(self, obj): def get_resume_link(self, obj):
ele = {'link': LINK_TO_STORAGE_RESUME + urllib.parse.quote(str(obj.student.roll_no) + "/" + obj.resume), 'name': obj.resume} ele = {'link': LINK_TO_STORAGE_RESUME + urllib.parse.quote(str(obj.student.roll_no) + "/" + obj.resume),
'name': obj.resume}
return ele return ele
class Meta: class Meta:
@ -186,6 +187,8 @@ class PlacementApplicationSerializerForAdmin(serializers.ModelSerializer):
model = PlacementApplication model = PlacementApplication
exclude = ['placement', 'resume'] exclude = ['placement', 'resume']
class ContributorSerializer(serializers.ModelSerializer): class ContributorSerializer(serializers.ModelSerializer):
class Meta: class Meta:
model = Contributor model = Contributor
fields = '__all__'