'Returns the upgrade deadline for this enrollment, if it is upgradeable.
If the seat cannot be upgraded, None is returned.
Note:
When loading this model, use `select_related` to retrieve the associated schedule object.
Returns:
datetime|None'

@property
def upgrade_deadline(self):

    log.debug('Schedules:    Determining    upgrade    deadline    for    CourseEnrollment    %d...', self.id)
    if (not CourseMode.is_mode_upgradeable(self.mode)):
        log.debug('Schedules:    %s    mode    of    %s    is    not    upgradeable.    Returning    None    for    upgrade    deadline.', self.mode, self.course_id)
        return None
    try:
        if self.schedule:
            log.debug('Schedules:    Pulling    upgrade    deadline    for    CourseEnrollment    %d    from    Schedule    %d.', self.id, self.schedule.id)
            return self.schedule.upgrade_deadline
    except ObjectDoesNotExist:
        log.debug('Schedules:    No    schedule    exists    for    CourseEnrollment    %d.', self.id)
        pass
    try:
        verified_mode = CourseMode.verified_mode_for_course(self.course_id)
        if verified_mode:
            log.debug('Schedules:    Defaulting    to    verified    mode    expiration    date-time    for    %s.', self.course_id)
            return verified_mode.expiration_datetime
        else:
            log.debug('Schedules:    No    verified    mode    located    for    %s.', self.course_id)
    except CourseMode.DoesNotExist:
        log.debug('Schedules:    %s    has    no    verified    mode.', self.course_id)
        pass
    log.debug('Schedules:    Returning    default    of    `None`')
    return None
