[CST-4058] LGTM issues solved

This commit is contained in:
Davide Negretti
2021-09-10 11:06:25 +02:00
parent 8df8b1c574
commit 5526cde869

View File

@@ -208,7 +208,7 @@ export class GroupFormComponent implements OnInit, OnDestroy {
this.formGroup.patchValue({ this.formGroup.patchValue({
groupName: activeGroup.name, groupName: activeGroup.name,
groupCommunity: linkedObject?.name ?? '', groupCommunity: linkedObject?.name ?? '',
groupDescription: activeGroup != null ? activeGroup.firstMetadataValue('dc.description') : '', groupDescription: activeGroup.firstMetadataValue('dc.description'),
}); });
} else { } else {
this.formModel = [ this.formModel = [
@@ -217,7 +217,7 @@ export class GroupFormComponent implements OnInit, OnDestroy {
]; ];
this.formGroup.patchValue({ this.formGroup.patchValue({
groupName: activeGroup.name, groupName: activeGroup.name,
groupDescription: activeGroup != null ? activeGroup.firstMetadataValue('dc.description') : '', groupDescription: activeGroup.firstMetadataValue('dc.description'),
}); });
} }
setTimeout(() => { setTimeout(() => {
@@ -446,11 +446,7 @@ export class GroupFormComponent implements OnInit, OnDestroy {
if (hasValue(group) && hasValue(group._links.object.href)) { if (hasValue(group) && hasValue(group._links.object.href)) {
return this.getLinkedDSO(group).pipe( return this.getLinkedDSO(group).pipe(
map((rd: RemoteData<DSpaceObject>) => { map((rd: RemoteData<DSpaceObject>) => {
if (hasValue(rd) && hasValue(rd.payload)) { return hasValue(rd) && hasValue(rd.payload);
return true;
} else {
return false;
}
}), }),
catchError(() => observableOf(false)), catchError(() => observableOf(false)),
); );