@@ -5,15 +5,15 @@ import {createAction, type ActionType} from 'redux-actions'
55
66import { createVoidPayloadAction , secureFetch } from '../../common/actions'
77import { isModuleEnabled } from '../../common/util/config'
8- import { fetchFeedSourceDeployments } from './deployments'
98import { fetchSnapshots } from '../../editor/actions/snapshots'
9+ import type { Feed , NewFeed } from '../../types'
10+ import type { dispatchFn , getStateFn } from '../../types/reducers'
11+
12+ import { fetchFeedSourceDeployments } from './deployments'
1013import { fetchProject , fetchProjectWithFeeds } from './projects'
1114import { handleJobResponse } from './status'
1215import { fetchFeedVersions } from './versions'
1316
14- import type { Feed , NewFeed } from '../../types'
15- import type { dispatchFn , getStateFn } from '../../types/reducers'
16-
1717// Private actions
1818const requestingFeedSource = createVoidPayloadAction ( 'REQUESTING_FEEDSOURCE' )
1919const requestingFeedSources = createVoidPayloadAction ( 'REQUESTING_FEEDSOURCES' )
@@ -81,6 +81,8 @@ export function createFeedSource (newFeed: NewFeed) {
8181export function updateFeedSource ( feedSource : Feed , properties : { [ string ] : any } ) {
8282 return function ( dispatch : dispatchFn , getState : getStateFn ) {
8383 dispatch ( savingFeedSource ( ) )
84+ // Convert feed source labels to format wanted by datatools-server
85+ feedSource . labels = feedSource . labels . map ( label => label . id )
8486 return dispatch ( secureFetch ( `${ FS_URL } /${ feedSource . id } ` , 'put' , { ...feedSource , ...properties } ) )
8587 // Re-fetch feed source with versions and snapshots.
8688 . then ( ( res ) => dispatch ( fetchFeedSource ( feedSource . id ) ) )
0 commit comments