Skip to content

Commit

Permalink
fix: fix course requirements issue with proxy class
Browse files Browse the repository at this point in the history
(cherry picked from commit 4f62355)
  • Loading branch information
mariajgrimaldi authored and Ian2012 committed Dec 9, 2022
1 parent bd43306 commit 1e1f512
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lms/djangoapps/certificates/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,12 @@ def save(self, *args, **kwargs): # pylint: disable=signature-differs
Credentials IDA.
"""
super().save(*args, **kwargs)
if self._meta.proxy:
sending_class = self._meta.proxy_for_model
else:
sending_class = self.__class__
COURSE_CERT_CHANGED.send_robust(
sender=self.__class__,
sender=sending_class,
user=self.user,
course_key=self.course_id,
mode=self.mode,
Expand Down Expand Up @@ -498,7 +502,7 @@ def save(self, *args, **kwargs): # pylint: disable=signature-differs

if CertificateStatuses.is_passing_status(self.status):
COURSE_CERT_AWARDED.send_robust(
sender=self.__class__,
sender=sending_class,
user=self.user,
course_key=self.course_id,
mode=self.mode,
Expand Down

0 comments on commit 1e1f512

Please sign in to comment.