|
@@ -115,7 +115,8 @@ class DetectControllerViewV2(View):
|
|
|
target_key = f'channel{channel}'
|
|
|
# 初始化存在标志
|
|
|
channel_found = False
|
|
|
- new_data = {target_key: list(map(int, event_types.split(',')))}
|
|
|
+ # 使用 map() 和条件表达式
|
|
|
+ new_data = {target_key: list(map(int, event_types.split(','))) if event_types else []}
|
|
|
# 检查 msg_notify 是否存在且包含 'nvr'
|
|
|
if msg_notify and 'nvr' in msg_notify:
|
|
|
|