Commit a84d2e19 by zhaochengxiang

bug fix

parent 13a15d7a
...@@ -858,13 +858,19 @@ const AssetAction = (props) => { ...@@ -858,13 +858,19 @@ const AssetAction = (props) => {
setConfirmLoading(true); setConfirmLoading(true);
if (reference === AssetDraftReference) { if (reference === AssetDraftReference) {
let data = action==='add' ? { elements: newElements } : { ...assets, elements: newElements }
if (isPostAsset(assets?.templateType)) {
data = {...data, ...postRealtionRef.current?.relations}
}
dispatch({ dispatch({
type: 'assetmanage.updateDraft', type: 'assetmanage.updateDraft',
payload: { payload: {
params: { params: {
isAdmin: true, isAdmin: true,
}, },
data: action==='add' ? { elements: newElements } : { ...assets, elements: newElements } data,
}, },
callback: () => { callback: () => {
setConfirmLoading(false); setConfirmLoading(false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment