diff --git a/src/app/core/cache/builders/remote-data-build.service.ts b/src/app/core/cache/builders/remote-data-build.service.ts index 16da33cb2e..0a1ba0b9e0 100644 --- a/src/app/core/cache/builders/remote-data-build.service.ts +++ b/src/app/core/cache/builders/remote-data-build.service.ts @@ -113,7 +113,6 @@ export class RemoteDataBuildService { href$ = observableOf(href$); } - href$.subscribe(href => console.log('request url: ', href)); const requestEntry$ = href$.pipe(getRequestFromRequestHref(this.requestService)); const tDomainList$ = requestEntry$.pipe( getResourceLinksFromResponse(), diff --git a/src/app/core/data/data.service.ts b/src/app/core/data/data.service.ts index 0bf09c5af4..9a2d14ce13 100644 --- a/src/app/core/data/data.service.ts +++ b/src/app/core/data/data.service.ts @@ -197,7 +197,7 @@ export abstract class DataService { } ), switchMap((href) => this.requestService.getByHref(href)), - skipWhile((requestEntry) => hasValue(requestEntry)), + skipWhile((requestEntry) => hasValue(requestEntry) && requestEntry.completed), switchMap((href) => this.rdbService.buildList(hrefObs) as Observable>> ) diff --git a/src/app/core/data/relationship.service.ts b/src/app/core/data/relationship.service.ts index fc831c3362..39c117d383 100644 --- a/src/app/core/data/relationship.service.ts +++ b/src/app/core/data/relationship.service.ts @@ -319,13 +319,13 @@ export class RelationshipService extends DataService { }) ) ), - switchMap((relationshipAndType: {relation: Relationship, type: RelationshipType}) => { + switchMap((relationshipAndType: { relation: Relationship, type: RelationshipType }) => { const { relation, type } = relationshipAndType; let updatedRelationship; if (relationshipLabel === type.leftwardType) { - updatedRelationship = Object.assign(new Relationship(), relation, { rightwardValue: nameVariant }); - } else { updatedRelationship = Object.assign(new Relationship(), relation, { leftwardValue: nameVariant }); + } else { + updatedRelationship = Object.assign(new Relationship(), relation, { rightwardValue: nameVariant }); } return this.update(updatedRelationship); }) diff --git a/src/app/core/shared/operators.ts b/src/app/core/shared/operators.ts index 098dda921b..875b3435ed 100644 --- a/src/app/core/shared/operators.ts +++ b/src/app/core/shared/operators.ts @@ -47,7 +47,6 @@ export const getResponseFromEntry = () => export const getResourceLinksFromResponse = () => (source: Observable): Observable => source.pipe( - tap((t) => console.log(t)), filterSuccessfulResponses(), map((response: DSOSuccessResponse) => response.resourceSelfLinks), ); diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts index f55680ad4e..185bb4a3a1 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts @@ -222,7 +222,6 @@ export class DsDynamicFormControlContainerComponent extends DynamicFormControlCo getRemoteDataPayload(), switchMap((submissionObject: SubmissionObject) => (submissionObject.item as Observable>).pipe(getSucceededRemoteData(), getRemoteDataPayload())), switchMap((item: Item) => this.relationService.getRelatedItemsByLabel(item, this.model.relationship.relationshipType)), - tap((t) => console.log(t)), map((items: PaginatedList) => items.page.map((item) => Object.assign(new SearchResult(), { indexableObject: item }))), ).subscribe((relatedItems: SearchResult[]) => this.selectableListService.select(this.listId, relatedItems));