Skip to content

Commit

Permalink
send currently selected tags when refreshing imatrics (superdesk#4149)
Browse files Browse the repository at this point in the history
SDNTB-785
  • Loading branch information
petrjasek authored Dec 1, 2022
1 parent fd6e3fb commit 8105b14
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/extensions/auto-tagging-widget/src/auto-tagging.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ export function getAutoTaggingComponent(superdesk: ISuperdesk, label: string) {

this.setState({data: 'loading'}, () => {
const {guid, language, headline, body_html, abstract} = this.props.article;
const tags = dataBeforeLoading !== 'not-initialized' && dataBeforeLoading !== 'loading' ?
dataBeforeLoading.changes.analysis :
OrderedMap<string, ITagUi>();

httpRequestJsonLocal<{analysis: IServerResponse}>({
method: 'POST',
Expand All @@ -202,6 +205,7 @@ export function getAutoTaggingComponent(superdesk: ISuperdesk, label: string) {
body_html,
abstract,
},
tags: toServerFormat(tags, superdesk),
},
}).then((res) => {
const resClient = toClientFormat(res.analysis);
Expand Down

0 comments on commit 8105b14

Please sign in to comment.