From 788b0b8d8000c87bc5bb37c79d876a1610a0693e Mon Sep 17 00:00:00 2001 From: pengtao Date: Wed, 9 Oct 2019 19:43:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=90=AF=E6=97=A5=E5=BF=97=E7=94=A8?= =?UTF-8?q?=E4=BA=8E=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handler/ad.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handler/ad.py b/handler/ad.py index f371711..ab26602 100644 --- a/handler/ad.py +++ b/handler/ad.py @@ -208,7 +208,7 @@ class Ad(Resource): condition = f"id='{self.args['id']}'" self.mydb.update("ad", ad, condition) print(f"status= {ad['status']}") - if ad['status'] == 1: + if str(ad['status']).strip() == str(1): print("aaaa") if rebuild_ad(): log.info(f"rebuild cache via ad change!")