Skip to content

Commit a3dd1d9

Browse files
committed
update registration licance set logic
1 parent 40525f3 commit a3dd1d9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/app/features/registries/components/registries-metadata-step/registries-license/registries-license.component.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,8 @@ export class RegistriesLicenseComponent {
7171
}
7272

7373
const defaultLicenseId = this.draftRegistration()?.defaultLicenseId;
74-
if (!licenses.find((license) => license.id === selectedLicense.id) && defaultLicenseId) {
74+
if (defaultLicenseId && !licenses.find((license) => license.id === selectedLicense.id)) {
7575
const defaultLicense = licenses.find((license) => license.id === defaultLicenseId);
76-
console.log('defaultLicense', defaultLicense);
77-
console.log('registry.defaultLicenseId', defaultLicenseId);
7876
if (defaultLicense) {
7977
this.control().patchValue({
8078
id: defaultLicense.id,
@@ -101,6 +99,7 @@ export class RegistriesLicenseComponent {
10199
this.control().patchValue({
102100
id: license.id,
103101
});
102+
console.log('license.id', license.id);
104103
this.control().markAsTouched();
105104
this.control().updateValueAndValidity();
106105
this.actions.saveLicense(this.draftId, license.id);

0 commit comments

Comments
 (0)