浏览代码

直播增加级别限制

abiao 4 年之前
父节点
当前提交
c18c5009c2
共有 1 个文件被更改,包括 7 次插入4 次删除
  1. 7 4
      app/models/live_broad.rb

+ 7 - 4
app/models/live_broad.rb

@@ -49,11 +49,14 @@ class LiveBroad < ActiveRecord::Base
           if item.length<=0
             next
           end
-          if i==0
-            str=RANK_HASH[item.to_s]
-          else
-            str=str+","+RANK_HASH[item.to_s]
+          if !RANK_HASH[item.to_s].blank?
+            if i==0
+              str=RANK_HASH[item.to_s]
+            else
+              str=str+","+RANK_HASH[item.to_s]
+            end
           end
+
           i=i+1
         end
       else