Skip to content

Commit

Permalink
Fixing course-run comment issue.
Browse files Browse the repository at this point in the history
ECOM-7146
  • Loading branch information
awais786 authored and bderusha committed Feb 14, 2017
1 parent 7ecebff commit 3267850
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion course_discovery/apps/publisher/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ def test_detail_page_with_comments(self):
self.client.login(username=self.user.username, password=USER_PASSWORD)
site = Site.objects.get(pk=settings.SITE_ID)

comment = CommentFactory(content_object=self.course, user=self.user, site=site)
comment = CommentFactory(content_object=self.course_run, user=self.user, site=site)
response = self.client.get(self.page_url)
self.assertEqual(response.status_code, 200)
self._assert_credits_seats(response, self.wrapped_course_run.credit_seat)
Expand Down
2 changes: 1 addition & 1 deletion course_discovery/apps/publisher/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def get_context_data(self, **kwargs):
user = self.request.user
course_run = CourseRunWrapper(self.get_object())
context['object'] = course_run
context['comment_object'] = course_run.course
context['comment_object'] = course_run
context['post_back_url'] = reverse('publisher:publisher_course_run_detail', kwargs={'pk': course_run.id})

context['can_edit'] = mixins.check_course_organization_permission(
Expand Down

0 comments on commit 3267850

Please sign in to comment.