Bugfix/reset form values to null if empty string (#3327)
* Reset form values to null if empty string * Update changelog
This commit is contained in:
parent
46432edce9
commit
55b0fe232c
@ -15,6 +15,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
- Upgraded `prisma` from version `5.12.1` to `5.13.0`
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed the form submit in the asset profile details dialog of the admin control due to the `url` validation
|
||||
|
||||
## 2.76.0 - 2024-04-23
|
||||
|
||||
### Changed
|
||||
|
@ -291,12 +291,12 @@ export class AssetProfileDialog implements OnDestroy, OnInit {
|
||||
symbolMapping,
|
||||
assetClass: this.assetProfileForm.get('assetClass').value,
|
||||
assetSubClass: this.assetProfileForm.get('assetSubClass').value,
|
||||
comment: this.assetProfileForm.get('comment').value ?? null,
|
||||
comment: this.assetProfileForm.get('comment').value || null,
|
||||
currency: (<Currency>(
|
||||
(<unknown>this.assetProfileForm.get('currency').value)
|
||||
))?.value,
|
||||
name: this.assetProfileForm.get('name').value,
|
||||
url: this.assetProfileForm.get('url').value
|
||||
url: this.assetProfileForm.get('url').value || null
|
||||
};
|
||||
|
||||
this.adminService
|
||||
|
@ -106,12 +106,12 @@ export class CreateOrUpdateAccountDialog implements OnDestroy {
|
||||
public async onSubmit() {
|
||||
const account: CreateAccountDto | UpdateAccountDto = {
|
||||
balance: this.accountForm.get('balance').value,
|
||||
comment: this.accountForm.get('comment').value,
|
||||
comment: this.accountForm.get('comment').value || null,
|
||||
currency: this.accountForm.get('currency').value?.value,
|
||||
id: this.accountForm.get('accountId').value,
|
||||
isExcluded: this.accountForm.get('isExcluded').value,
|
||||
name: this.accountForm.get('name').value,
|
||||
platformId: this.accountForm.get('platformId').value?.id ?? null
|
||||
platformId: this.accountForm.get('platformId').value?.id || null
|
||||
};
|
||||
|
||||
try {
|
||||
|
@ -448,7 +448,7 @@ export class CreateOrUpdateActivityDialog implements OnDestroy {
|
||||
accountId: this.activityForm.get('accountId').value,
|
||||
assetClass: this.activityForm.get('assetClass').value,
|
||||
assetSubClass: this.activityForm.get('assetSubClass').value,
|
||||
comment: this.activityForm.get('comment').value,
|
||||
comment: this.activityForm.get('comment').value || null,
|
||||
currency: this.activityForm.get('currency').value,
|
||||
customCurrency: this.activityForm.get('currencyOfUnitPrice').value,
|
||||
date: this.activityForm.get('date').value,
|
||||
|
Loading…
x
Reference in New Issue
Block a user