Skip to content

Commit

Permalink
fix: missing content titles on assignments (#318)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnagro authored Nov 3, 2023
2 parents 9463b0d + 20665bf commit 961d5d1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ def test_allocate_happy_path_e2e(
assignment records as we'd expect.
"""
mock_get_and_cache_content_metadata.return_value = {
'title': self.content_title,
'content_title': self.content_title,
}
mock_aggregates_for_policy.return_value = {
'total_quantity': -100 * 100,
Expand Down
2 changes: 1 addition & 1 deletion enterprise_access/apps/content_assignments/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ def _get_content_title(assignment_configuration, content_key):
assignment_configuration.enterprise_customer_uuid,
content_key,
)
return content_metadata.get('title')
return content_metadata.get('content_title')


def _create_new_assignments(assignment_configuration, learner_emails, content_key, content_quantity):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def test_allocate_assignments_happy_path(self, mock_get_and_cache_content_metada
f'{name}@foo.com' for name in ('alice', 'bob', 'carol', 'david', 'eugene')
]
mock_get_and_cache_content_metadata.return_value = {
'title': content_title,
'content_title': content_title,
}

allocated_assignment = LearnerContentAssignmentFactory.create(
Expand Down

0 comments on commit 961d5d1

Please sign in to comment.