瀏覽代碼

Fix push_service: fix records

StrayWarrior 1 周之前
父節點
當前提交
b4289b435f
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      pqai_agent/push_service.py

+ 1 - 1
pqai_agent/push_service.py

@@ -168,7 +168,7 @@ class PushTaskWorkerPool:
                         messages_to_send.append(item)
             current_ts = int(time.time())
             with self.agent_service.AgentDBSession() as session:
-                msg_list = []
+                msg_list = [{"type": msg["type"].value, "content": msg["content"]} for msg in messages_to_send]
                 record = AgentPushRecord(staff_id=staff_id, user_id=user_id,
                                          content=json.dumps(msg_list, ensure_ascii=False),
                                          timestamp=current_ts)