Commit c62059f2 authored by 李小芳's avatar 李小芳

Merge branch 'mr/beta/dbmw' into 'master'

grey

See merge request !40
parents 11a0866a 0ef6caf4
......@@ -1078,10 +1078,13 @@ class Answer(models.Model):
n_days = today - delta
data = StrategyContentExposureIndex.objects.using(settings.DORIS_DB_NAME).filter(
create_day=n_days, card_id=answer_id, card_content_type="answer").first()
if data.ctr >= 0.05 and data.preciseexposure_num >= 50 and data.avg_page_stay >= 20:
return 0 # 0是正常展示 1不展示
if data:
if data.ctr >= 0.05 and data.preciseexposure_num >= 50 and data.avg_page_stay >= 20:
return 0 # 0是正常展示 1不展示
return 1
else:
return 1
except:
logging.error("catch exception,err_msg:%s" % traceback.format_exc())
return 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment