Incorrect certification expiration date

Course definition has a new field called certification years. This is a back-up field if there's no value for certification expiration date. The code below will set the expiry_date to certification expiration date if it has value, otherwise uses certification years to calculate the expiration date.

expiry_date = cert.certification_expiration_date if cert.certification_expiration_date else course_details.course_date_to + relativedelta(years=course.certification_years)