Commit d8dd5b47 by Clinton Blackburn

Fixed bug on Course model

getOrCreateSeat was calling a property when it should have been calling a method.

XCOM-520
parent e295b67d
...@@ -160,10 +160,9 @@ define([ ...@@ -160,10 +160,9 @@ define([
products = this.get('products'), products = this.get('products'),
seat = products.find(function (product) { seat = products.find(function (product) {
// Filter out parent products since there is no need to display or modify. // Filter out parent products since there is no need to display or modify.
return (product instanceof CourseSeat) && (product.seatType === seatType); return (product instanceof CourseSeat) && (product.getSeatType() === seatType);
}); });
// Do NOT create new audit seats
if (!seat) { if (!seat) {
seatClass = CourseUtils.getCourseSeatModel(seatType); seatClass = CourseUtils.getCourseSeatModel(seatType);
/*jshint newcap: false */ /*jshint newcap: false */
......
...@@ -14,10 +14,6 @@ define([ ...@@ -14,10 +14,6 @@ define([
}, },
validation: { validation: {
// TODO Determine how to set this to the model's default.
//certificate_type: {
// required: true
//},
price: { price: {
required: true required: true
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment