entity version fix

This commit is contained in:
mpetrov 2025-02-18 13:19:00 +02:00
parent 08b9c4ed1b
commit cc89f5fbca

View File

@ -122,7 +122,7 @@ export class CalculatedFieldDialogComponent extends DialogComponent<CalculatedFi
add(): void {
if (this.fieldFormGroup.valid) {
this.calculatedFieldsService.saveCalculatedField({ entityId: this.data.entityId, id: this.data.value?.id, ...this.fromGroupValue})
this.calculatedFieldsService.saveCalculatedField({ entityId: this.data.entityId, ...(this.data.value ?? {}), ...this.fromGroupValue})
.pipe(takeUntilDestroyed(this.destroyRef))
.subscribe(calculatedField => this.dialogRef.close(calculatedField));
}