Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions dtable_events/utils/dtable_server_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,8 @@ def upload_email_attachment(self, name, content: bytes, email_id):
}

def batch_send_notification(self, user_msg_list):
if not user_msg_list:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[警告] 补充空批次回归测试

影响:此次修复依赖该提前返回,但 PR 未加入通知发送测试,现有 CI 仅运行 SQL 测试。若后续移除或绕过此判断,空批次再次触发 Go 接口 400 的问题不会被现有测试发现。

建议修复:提交 mock requests.post 的单元测试,断言 [] 不发请求且正常返回;同时覆盖非空批次恰好发送一次、请求体不变及错误响应仍抛出异常。

return
url = self.dtable_server_url + '/api/v1/dtables/' + self.dtable_uuid + '/notifications-batch/?from=dtable_events'
body = {
'user_messages': user_msg_list,
Expand Down
Loading