From 90f2686f7243328b88877430ee3a5ca364f9f7eb Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Tue, 28 Oct 2014 14:49:38 +0800 Subject: [PATCH] fix for empty content --- app/controllers/upgrade_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/upgrade_controller.rb b/app/controllers/upgrade_controller.rb index 0b0f431..679c74e 100644 --- a/app/controllers/upgrade_controller.rb +++ b/app/controllers/upgrade_controller.rb @@ -52,8 +52,8 @@ class UpgradeController < ApplicationController } end text = {"en" => "", "zh_tw" => ""} - text["en"] = smart_convertor(b.text_translations["en"]) - text["zh_tw"] = smart_convertor(b.text_translations["zh_tw"]) + text["en"] = smart_convertor(b.text_translations["en"]) if !b.text_translations["en"].nil? + text["zh_tw"] = smart_convertor(b.text_translations["zh_tw"]) if !b.text_translations["en"].nil? { "id" => b.id.to_s,