morph bug fix (#15370)
Two bug fixes here:
# MorphRelationOneToManyFieldDisplay
we expect an empty array, not undefined (run time error otherwise)
Fixes `Cannot read properties of undefined (reading 'length'): Cannot
read properties of undefined (reading 'length')` in
**MorphRelationOneToManyFieldDisplay**
```js
morphValuesWithObjectNameSingular.every(
(morphValueWithObjectNameSingular) =>
morphValueWithObjectNameSingular.value.length === 0,
);
```
# create record in table mode
if the record has a relation there is currenlty a bug in production when
it is created. A cache issue.
`Missing field 'companyFoundedId' while writing result `
This commit is contained in:
@@ -27,7 +27,7 @@ export const prefillRecord = <T extends ObjectRecord>({
|
||||
fieldMetadataItem.relation?.type === RelationType.MANY_TO_ONE
|
||||
) {
|
||||
const joinColumnValue =
|
||||
input[fieldMetadataItem.settings?.joinColumnName];
|
||||
input[fieldMetadataItem.settings?.joinColumnName] ?? null;
|
||||
throwIfInputRelationDataIsInconsistent(input, fieldMetadataItem);
|
||||
|
||||
return [
|
||||
|
||||
Reference in New Issue
Block a user