From 94329abd189ecd105bd1bf03450861a9852acad6 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Wed, 30 Dec 2015 00:33:23 +0800 Subject: [PATCH] small fix for personal course frontend --- app/controllers/personal_courses_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/personal_courses_controller.rb b/app/controllers/personal_courses_controller.rb index 1f8aacf..3376472 100644 --- a/app/controllers/personal_courses_controller.rb +++ b/app/controllers/personal_courses_controller.rb @@ -5,8 +5,8 @@ class PersonalCoursesController < ApplicationController { "year" => course.year, "title" => course.title, - "category" => course.course_category.title, - "semester" => course.course_semester.title, + "category" => (course.course_category.title rescue ""), + "semester" => (course.course_semester.title rescue ""), "authors" => (course.member_profile.name rescue ""), "link_to_show" => OrbitHelper.url_to_show(course.to_param) }