From a232108d6dd9c49fdaec7d298975a8061b92a0a0 Mon Sep 17 00:00:00 2001 From: p31729568 <winse.wang@foxmail.com> Date: Fri, 2 Aug 2019 21:57:51 +0800 Subject: [PATCH] fix --- app/views/tidings/_tiding.json.jbuilder | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/tidings/_tiding.json.jbuilder b/app/views/tidings/_tiding.json.jbuilder index 460f7c403..207d4b137 100644 --- a/app/views/tidings/_tiding.json.jbuilder +++ b/app/views/tidings/_tiding.json.jbuilder @@ -8,9 +8,9 @@ json.auth_type tiding.container_type == 'ApplyUserAuthentication' ? tiding.conta homework_type = nil if tiding.container_type == 'HomeworkCommon' homework_type = tiding.container.homework_type rescue nil - if homework_type.blank? - homework_type = tiding.parent_container.homework_type rescue nil - end +end +if homework_type.blank? && tiding.parent_container_type == 'HomeworkCommon' + homework_type = tiding.parent_container.homework_type rescue nil end json.homework_type homework_type