'This function creates a RegistrationCodeRedemption entry in case the registration codes were invoice generated
and thus the order_id is missing.'

@classmethod
def create_invoice_generated_registration_redemption(cls, course_reg_code, user):

    code_redemption = RegistrationCodeRedemption(registration_code=course_reg_code, redeemed_by=user)
    code_redemption.save()
    return code_redemption
