feat: ✨ Permetti models null
This commit is contained in:
parent
0a62b47b58
commit
b579db3f98
|
@ -382,9 +382,11 @@ export class RecordsPage extends Page {
|
|||
data.each((value, field) => {
|
||||
if (typeof field === 'string' && field.includes(':')) {
|
||||
const [relation, fieldName] = field.split(':');
|
||||
const relationModel = this.getRelation(model, relation, true) as IModel;
|
||||
const relationModel = this.getRelation(model, relation, true);
|
||||
if (relationModel) {
|
||||
relationModel[fieldName] = value;
|
||||
relations[relation] = relationModel;
|
||||
}
|
||||
} else {
|
||||
model[field as string] = value;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue