From 0d00fd17442a0110739893a62e8349a7c02ad226 Mon Sep 17 00:00:00 2001 From: chenjing Date: Wed, 14 Jun 2023 11:22:13 +0800 Subject: [PATCH] fix when cla nil index error --- app/views/organizations/clas/index.json.jbuilder | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/views/organizations/clas/index.json.jbuilder b/app/views/organizations/clas/index.json.jbuilder index 260943dce..632fde017 100644 --- a/app/views/organizations/clas/index.json.jbuilder +++ b/app/views/organizations/clas/index.json.jbuilder @@ -1,4 +1,3 @@ -json.id @cla.id -json.key @cla.key -json.name @cla.name -json.pr_need @cla.pr_need +if @cla.present? + json.partial! "detail", cla: @cla +end \ No newline at end of file