Fixed payment page bug

Using SKU to choose course mode when creating an order.

ECOM-2172
This commit is contained in:
Clinton Blackburn
2015-09-16 15:30:05 -04:00
committed by Clinton Blackburn
parent 7ee03f336e
commit 12a4e85d94
7 changed files with 34 additions and 9 deletions

View File

@@ -126,6 +126,16 @@ class CourseMode(models.Model):
self.currency = self.currency.lower()
super(CourseMode, self).save(force_insert, force_update, using)
@property
def slug(self):
"""
Returns mode_slug
NOTE (CCB): This is a silly hack needed because all of the class methods use tuples
with a property named slug instead of mode_slug.
"""
return self.mode_slug
@classmethod
def all_modes_for_courses(cls, course_id_list):
"""Find all modes for a list of course IDs, including expired modes.