diff --git a/lms/djangoapps/instructor_task/subtasks.py b/lms/djangoapps/instructor_task/subtasks.py index 093eddce98..7ca32ddace 100644 --- a/lms/djangoapps/instructor_task/subtasks.py +++ b/lms/djangoapps/instructor_task/subtasks.py @@ -165,7 +165,7 @@ class SubtaskStatus(object): self.state = state if state is not None else QUEUING @classmethod - def from_dict(self, d): + def from_dict(cls, d): """Construct a SubtaskStatus object from a dict representation.""" options = dict(d) task_id = options['task_id'] @@ -173,9 +173,9 @@ class SubtaskStatus(object): return SubtaskStatus.create(task_id, **options) @classmethod - def create(self, task_id, **options): + def create(cls, task_id, **options): """Construct a SubtaskStatus object.""" - return self(task_id, **options) + return cls(task_id, **options) def to_dict(self): """ diff --git a/lms/djangoapps/shoppingcart/models.py b/lms/djangoapps/shoppingcart/models.py index cd50e8f970..8b0c1c7268 100644 --- a/lms/djangoapps/shoppingcart/models.py +++ b/lms/djangoapps/shoppingcart/models.py @@ -1930,7 +1930,7 @@ class Donation(OrderItem): ).format(platform_name=settings.PLATFORM_NAME) @classmethod - def _line_item_description(self, course_id=None): + def _line_item_description(cls, course_id=None): """Create a line-item description for the donation. Includes the course display name if provided.