Skip to content

Commit

Permalink
fix!: fix course detail page url bug
Browse files Browse the repository at this point in the history
fix course detail page url as after creating a course, its detail page was not accessible and showing nothing.
The course page was unavailable when the course run includes a dot, as a result it's url was mismatching and it is fixed by adding the trailing slash "/" to the url.

Here's the link to the initial GitHub issue: openedx/wg-build-test-release#301
  • Loading branch information
Muhammad Faraz Maqsood committed Sep 25, 2023
1 parent f0e196f commit b3ec527
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ecommerce/static/js/models/course_model.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ define([

return Backbone.RelationalModel.extend({
urlRoot: '/api/v2/courses/',
url: function() {
return Backbone.Model.prototype.url.call(this) + '/';
},

defaults: {
id: null,
Expand Down

0 comments on commit b3ec527

Please sign in to comment.