diff --git a/app/controllers/challenges_controller.rb b/app/controllers/challenges_controller.rb index 4024a2629..3f020a424 100644 --- a/app/controllers/challenges_controller.rb +++ b/app/controllers/challenges_controller.rb @@ -164,7 +164,11 @@ class ChallengesController < ApplicationController @challenges = @shixun.challenges.joins(join_sql).select(base_columns).uniq - @shixun_modify = (@challenges.select{|c| c.status.present? }.size == @challenges.size) + @shixun_modify = (@challenges.select{|c| !c.status.nil? }.size != @challenges.size) + + logger.info("########shixun_modify:#{@shixun_modify}") + logger.info("########challenges.size:#{@challenges.size}") + logger.info("########challenge_inspect:#{@challenges.inspect}") #@challenges = @shixun.challenges.fields_for_list @editable = @shixun.status == 0 # before_action:有判断权限,如果没发布,则肯定是管理人员 diff --git a/public/react/src/modules/user/usersInfo/InfosShixun.js b/public/react/src/modules/user/usersInfo/InfosShixun.js index 2f4127dc8..89fb8814c 100644 --- a/public/react/src/modules/user/usersInfo/InfosShixun.js +++ b/public/react/src/modules/user/usersInfo/InfosShixun.js @@ -243,7 +243,7 @@ class InfosShixun extends Component{