'Returns the registration code redemption object if found else returns None.'

@classmethod
def get_registration_code_redemption(cls, code, course_id):

    try:
        code_redemption = cls.objects.get(registration_code__code=code, registration_code__course_id=course_id)
    except cls.DoesNotExist:
        code_redemption = None
    return code_redemption
