Insert Conv only if message was success
This commit is contained in:
@@ -124,6 +124,8 @@ namespace BeWo.Service.Plugins
|
||||
|
||||
var conv = createAiConversation(conversation.UIContext, conversation.ContextBeWoObjects, modell_oid, config.Context_Type);
|
||||
|
||||
DAOFactory.GenericDAO.Insert(conv);
|
||||
|
||||
var conv_dc = MapperFactory.AiConversation.MapToNewDC(conv);
|
||||
|
||||
return conv_dc;
|
||||
@@ -136,6 +138,8 @@ namespace BeWo.Service.Plugins
|
||||
|
||||
var new_messages = sendNewMessage(conv, message, config);
|
||||
|
||||
DAOFactory.GenericDAO.Insert(conv);
|
||||
|
||||
var conv_dc = MapperFactory.AiConversation.MapToNewDC(conv);
|
||||
|
||||
return conv_dc;
|
||||
@@ -287,8 +291,6 @@ namespace BeWo.Service.Plugins
|
||||
|
||||
conv.Messages.Add(msg);
|
||||
|
||||
DAOFactory.GenericDAO.Insert(conv);
|
||||
|
||||
return conv;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user