From 5490800b40ba9ffd6b4b086e8d5884dc004c0de2 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 9 Mar 2020 16:43:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/challenge.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/challenge.rb b/app/models/challenge.rb index 6f361e380..d532d6d55 100644 --- a/app/models/challenge.rb +++ b/app/models/challenge.rb @@ -70,9 +70,10 @@ class Challenge < ApplicationRecord # 开启挑战 def open_game + # 这里的identifier,status是关联了games取了games的identifier,status identifier = self.identifier if identifier.present? - shixun.task_pass || status != 3 ? "/tasks/#{identifier}" : "" + shixun.task_pass || self.status != 3 ? "/tasks/#{identifier}" : "" else self.position == 1 ? "/api/shixuns/#{shixun.identifier}/shixun_exec" : "" end