File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
frontend/src/modules/scaffold/views Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,7 @@ define([
9797 var flatItem = Helpers . flattenNestedProperties ( this . editor . value ) ;
9898 var itemValues = _ . values ( flatItem ) ;
9999 var parentAttributes = Origin . scaffold . getCurrentModel ( ) . attributes ;
100+ var parentId = parentAttributes . _type === 'course' ? parentAttributes . _id : parentAttributes . _parentId ;
100101 itemValues . forEach ( function ( item ) {
101102 if ( typeof item !== 'string' || item . indexOf ( 'course/assets' ) === - 1 ) return ;
102103
@@ -112,7 +113,7 @@ define([
112113 _contentTypeId : parentAttributes . _id ,
113114 _fieldName : itemFileName ,
114115 _assetId : result [ 0 ] . _id ,
115- _contentTypeParentId : parentAttributes . _parentId
116+ _contentTypeParentId : parentId
116117 } , {
117118 error : function ( error ) {
118119 Origin . Notify . alert ( {
You can’t perform that action at this time.
0 commit comments