mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
65240: ComCol logo caching issue fix
This commit is contained in:
@@ -182,7 +182,7 @@ export class ComColFormComponent<T extends DSpaceObject> implements OnInit, OnDe
|
||||
});
|
||||
this.submitForm.emit({
|
||||
dso: updatedDSO,
|
||||
uploader: this.uploaderComponent.uploader
|
||||
uploader: hasValue(this.uploaderComponent) ? this.uploaderComponent.uploader : undefined
|
||||
});
|
||||
}
|
||||
|
||||
@@ -221,7 +221,7 @@ export class ComColFormComponent<T extends DSpaceObject> implements OnInit, OnDe
|
||||
errorResponse.errorMessage
|
||||
);
|
||||
}
|
||||
this.refreshCache();
|
||||
(this.dso as any).logo = undefined;
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -230,7 +230,6 @@ export class ComColFormComponent<T extends DSpaceObject> implements OnInit, OnDe
|
||||
* Refresh the object's cache to ensure the latest version
|
||||
*/
|
||||
private refreshCache() {
|
||||
(this.dso as any).logo = undefined;
|
||||
this.requestService.removeByHrefSubstring(this.dso.self);
|
||||
this.objectCache.remove(this.dso.self);
|
||||
}
|
||||
|
@@ -5,7 +5,7 @@ import { RemoteData } from '../../../../core/data/remote-data';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { first, map, take } from 'rxjs/operators';
|
||||
import { getSucceededRemoteData } from '../../../../core/shared/operators';
|
||||
import { isNotUndefined } from '../../../empty.util';
|
||||
import { hasValue, isNotUndefined } from '../../../empty.util';
|
||||
import { DataService } from '../../../../core/data/data.service';
|
||||
import { ResourceType } from '../../../../core/shared/resource-type';
|
||||
import { ComColDataService } from '../../../../core/data/comcol-data.service';
|
||||
@@ -57,7 +57,7 @@ export class ComcolMetadataComponent<TDomain extends DSpaceObject> implements On
|
||||
.subscribe((dsoRD: RemoteData<TDomain>) => {
|
||||
if (isNotUndefined(dsoRD)) {
|
||||
const newUUID = dsoRD.payload.uuid;
|
||||
if (uploader.queue.length > 0) {
|
||||
if (hasValue(uploader) && uploader.queue.length > 0) {
|
||||
this.dsoDataService.getLogoEndpoint(newUUID).pipe(take(1)).subscribe((href: string) => {
|
||||
uploader.options.url = href;
|
||||
uploader.uploadAll();
|
||||
|
Reference in New Issue
Block a user