Skip to content

Commit

Permalink
fix(ui): do not overwrite license ID
Browse files Browse the repository at this point in the history
  • Loading branch information
kosmoz committed Feb 17, 2025
1 parent 6195e4d commit 47f5070
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,13 @@ export class DeploymentFormComponent implements OnInit, AfterViewInit, OnDestroy
});

this.licenses$.pipe(takeUntil(this.destroyed$)).subscribe((licenses) => {
if (licenses.length > 0 && licenses[0].id) {
// Only update the form control, if the previously selected version is no longer in the list
if (
licenses.length > 0 &&
licenses[0].id &&
licenses.every((l) => l.id !== this.deployForm.controls.applicationLicenseId.value)
) {
this.deployForm.controls.applicationLicenseId.setValue(licenses[0].id);
} else {
this.deployForm.controls.applicationLicenseId.reset();
}
});

Expand Down

0 comments on commit 47f5070

Please sign in to comment.