校验解码

FFIB 13 小时之前
父节点
当前提交
416eebe75b
共有 1 个文件被更改,包括 2 次插入 和 2 次删除
  1. 2 2
      api/encrypt_views.py

+ 2 - 2
api/encrypt_views.py

@@ -165,7 +165,7 @@ def decrypt(request, v='v2'):
165 165
     lotterys = LotteryCampaignInfo.objects.filter(status=True)
166 166
    
167 167
     if lotterys.exists():
168
-        active_lotterys = [lottery.data for lottery in lotterys if lottery.is_active()]
168
+        active_lotterys = [lottery.data for lottery in lotterys if lottery.is_active() and model.model_id in lottery.model_ids]
169 169
     else:
170 170
         active_lotterys = None
171 171
 
@@ -269,7 +269,7 @@ def decrypt2(request, v='v2'):
269 269
     lotterys = LotteryCampaignInfo.objects.filter(status=True)
270 270
    
271 271
     if lotterys.exists():
272
-        active_lotterys = [lottery.data for lottery in lotterys if lottery.is_active()]
272
+        active_lotterys = [lottery.data for lottery in lotterys if lottery.is_active() and model.model_id in lottery.model_ids]
273 273
     else:
274 274
         active_lotterys = None
275 275