m
zhaoqingang
2024-12-09 52ba4076f5ad55fdf3239a33a2a376eaa0e0dea5
app/api/agent.py
@@ -143,14 +143,14 @@
                        elif 'report_name' in message_json:
                            message = message_json['report_name']
                    except json.JSONDecodeError:
                    except Exception as e:
                        pass  # 非 JSON 字符串,继续使用原始 message
                if session.get('files') and isinstance(session.get('files'), str):
                    try:
                        files = json.loads(session.get('files'))
                        process_files(files, agent_id)
                    except json.JSONDecodeError:
                    except Exception as e:
                        pass  # 非 JSON 字符串,继续使用原始 message
                # 检查 message 是否为 None