diff --git a/ecommerce/static/js/models/course_model.js b/ecommerce/static/js/models/course_model.js index feb173e5d4c..8b13259d6ff 100644 --- a/ecommerce/static/js/models/course_model.js +++ b/ecommerce/static/js/models/course_model.js @@ -31,6 +31,11 @@ define([ return Backbone.RelationalModel.extend({ urlRoot: '/api/v2/courses/', + // course detail page url was not matching because of missing trailing slash, + // with thi function, trailing slash will be added to match the url + url: function() { + return Backbone.Model.prototype.url.call(this) + '/'; + }, defaults: { id: null,