fix: snap_and_analyse ecs为空就不创建事件

This commit is contained in:
caoqianming 2024-03-02 08:59:47 +08:00
parent 39d69952f1
commit 641c4cefc6
1 changed files with 19 additions and 18 deletions

View File

@ -718,6 +718,7 @@ def snap_and_analyse(vchannel: TDevice, algo_codes: list, opl: Opl = None):
ecs = [cate for cate in ecs if check_same_allow_minute_and_raise_event(
cate, ep, None, obj_cate) is True]
if ecs:
event = Event()
event.global_img = ec_codes['global_img'] if ec_codes.get(
'global_img', None) else save_dahua_pic(global_img_o)