Skip to content

Commit

Permalink
Merge pull request #1627 from gtech-mulearn/dev
Browse files Browse the repository at this point in the history
department and graduation year fix
  • Loading branch information
adnankattekaden authored Nov 28, 2023
2 parents 0ddaec4 + 54e3366 commit 8d51b4f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions api/dashboard/campus/campus_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ def get(self, request):
karma=F("wallet_user__karma"),
level=F("user_lvl_link_user__level__name"),
join_date=F("created_at"),
department=F('user_organization_link_user__department__title'),
graduation_year=F("user_organization_link_user__graduation_year")
))

paginated_queryset = CommonUtils.get_paginated_queryset(
Expand Down
5 changes: 2 additions & 3 deletions api/dashboard/campus/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ class CampusDetailsSerializer(serializers.ModelSerializer):
rank = serializers.SerializerMethodField()

lead = serializers.SerializerMethodField()
department = serializers.CharField(source="department.title")

class Meta:
model = UserOrganizationLink
Expand All @@ -38,8 +37,6 @@ class Meta:
"active_members",
"rank",
"lead",
"graduation_year",
"department"
]

def get_lead(self, obj):
Expand Down Expand Up @@ -124,6 +121,8 @@ class CampusStudentDetailsSerializer(serializers.Serializer):
join_date = serializers.CharField()
email = serializers.CharField()
mobile = serializers.CharField()
graduation_year = serializers.CharField()
department = serializers.CharField()

class Meta:
fields = ("user_id", "email", "mobile", "fullname", "karma", "muid", "rank", "level", "join_date")
Expand Down

0 comments on commit 8d51b4f

Please sign in to comment.