From d98a9f51a02e62fa98e5d3b7e59fed4bd6152db4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=BC=9F?= <250213850@qq.com> Date: Mon, 23 May 2022 15:38:59 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E5=9B=A0=E6=B2=A1=E4=BC=A0label=5Fid=E8=80=8C?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/behavior_analysis.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/behavior_analysis.py b/models/behavior_analysis.py index 80ac374..6cfbf47 100644 --- a/models/behavior_analysis.py +++ b/models/behavior_analysis.py @@ -679,7 +679,7 @@ ORDER BY level .where(and_(*where)) \ .group_by(event_date_col,e_account_id_col) sql = str(qry.compile(compile_kwargs={"literal_binds": True})) - columnName = event['label_id'] + columnName = event.get('label_id','') if columnName != '': sql = sql.replace('SELECT', f'SELECT {columnName},', 1) sql += f',{columnName}'