Skip to content

Commit

Permalink
fix: use LearnerLicenseSerializer in LicenseActivationView (#741)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamstankiewicz authored Nov 20, 2024
1 parent 4c66189 commit 7958944
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ def test_activate_an_assigned_license(self, mock_send_post_activation_email_task
assert activated_license['status'] == constants.ACTIVATED
expected_activation_date = self.now.strftime('%Y-%m-%dT%H:%M:%S.%fZ')
assert activated_license['activation_date'] == expected_activation_date
assert activated_license['subscription_plan']['uuid'] == str(license_to_be_activated.subscription_plan.uuid)

# Refresh license from the database
license_to_be_activated.refresh_from_db()
Expand Down
2 changes: 1 addition & 1 deletion license_manager/apps/api/v1/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1801,7 +1801,7 @@ def post(self, request):

# There's an implied logical branch where the license is already activated
# in which case we also return as if the activation action was successful.
serialized_license = serializers.LicenseSerializer(user_license)
serialized_license = serializers.LearnerLicenseSerializer(user_license)
return Response(serialized_license.data, status=status.HTTP_200_OK)

def _track_and_notify(self, user_license):
Expand Down

0 comments on commit 7958944

Please sign in to comment.