File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1076,7 +1076,7 @@ export default class AdminForthRestAPI implements IAdminForthRestAPI {
10761076
10771077 // for polymorphic foreign resources, we need to find out the value for polymorphicOn column
10781078 for ( const column of resource . columns ) {
1079- if ( column . foreignResource ?. polymorphicOn ) {
1079+ if ( column . foreignResource ?. polymorphicOn && record [ column . name ] !== undefined ) {
10801080 let newPolymorphicOnValue = null ;
10811081 if ( record [ column . name ] ) {
10821082 const targetResources = { } ;
Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ async function saveRecord() {
145145
146146 const column = coreStore .resource .columns .find ((c ) => c .name === key );
147147 if (column ?.foreignResource ) {
148- columnIsUpdated = record .value [key ] !== coreStore .record [key ].pk ;
148+ columnIsUpdated = record .value [key ] !== coreStore .record [key ]? .pk ;
149149 }
150150
151151 if (columnIsUpdated ) {
You can’t perform that action at this time.
0 commit comments