Files
edx-platform/common/djangoapps/entitlements/signals.py
Kyle McCormick 9aefd6f986 style: django-not-configured is not a sensible lint-amnesty value (#26862)
django-not-configured is an error raised by pylint (with
the pylint-django plugin) when it's not correctly configured.

We should not be applying lint amnesty for such a violation.
2021-03-05 08:11:58 -05:00

18 lines
530 B
Python

"""
Entitlements related signal handlers.
"""
from django.dispatch import receiver
from common.djangoapps.entitlements.models import CourseEntitlement
from common.djangoapps.student.signals import UNENROLL_DONE
@receiver(UNENROLL_DONE)
def unenroll_entitlement(sender, course_enrollment=None, skip_refund=False, **kwargs): # pylint: disable=unused-argument
"""
Un-enroll user from entitlement upon course run un-enrollment if exist.
"""
CourseEntitlement.unenroll_entitlement(course_enrollment, skip_refund)