Skip to content

Commit

Permalink
Fix incorrectly passed doc_id param (elastic#173180)
Browse files Browse the repository at this point in the history
  • Loading branch information
CoenWarmer authored Dec 13, 2023
1 parent 86bdae2 commit e9e9041
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function useCreateKnowledgeBaseEntry() {
{
entry: Omit<
KnowledgeBaseEntry,
'@timestamp' | 'confidence' | 'is_correction' | 'public' | 'labels' | 'role'
'@timestamp' | 'confidence' | 'is_correction' | 'public' | 'labels' | 'role' | 'doc_id'
>;
}
>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export function KnowledgeBaseEditManualEntryFlyout({
createEntry({
entry: {
id: newEntryId,
doc_id: newEntryId,
text: newEntryText,
},
}).then(onClose);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ describe('KnowledgeBaseTab', () => {

getByTestId('knowledgeBaseEditManualEntryFlyoutSaveButton').click();

expect(createMock).toHaveBeenCalledWith({ entry: { id: 'foo', doc_id: 'foo', text: '' } });
expect(createMock).toHaveBeenCalledWith({ entry: { id: 'foo', text: '' } });
});
});

Expand Down

0 comments on commit e9e9041

Please sign in to comment.