mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
fixed edit submission bug
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import { Inject, Injectable } from '@angular/core';
|
||||
import { deepClone } from 'fast-json-patch';
|
||||
import { DSOResponseParsingService } from '../data/dso-response-parsing.service';
|
||||
|
||||
import { ResponseParsingService } from '../data/parsing.service';
|
||||
import { RestRequest } from '../data/request.models';
|
||||
@@ -76,7 +78,9 @@ export class SubmissionResponseParsingService extends BaseResponseParsingService
|
||||
protected toCache = false;
|
||||
|
||||
constructor(@Inject(GLOBAL_CONFIG) protected EnvConfig: GlobalConfig,
|
||||
protected objectCache: ObjectCacheService) {
|
||||
protected objectCache: ObjectCacheService,
|
||||
protected dsoParser: DSOResponseParsingService
|
||||
) {
|
||||
super();
|
||||
}
|
||||
|
||||
@@ -88,6 +92,7 @@ export class SubmissionResponseParsingService extends BaseResponseParsingService
|
||||
* @returns {RestResponse}
|
||||
*/
|
||||
parse(request: RestRequest, data: DSpaceRESTV2Response): RestResponse {
|
||||
this.dsoParser.parse(deepClone(request), deepClone(data));
|
||||
if (isNotEmpty(data.payload)
|
||||
&& isNotEmpty(data.payload._links)
|
||||
&& this.isSuccessStatus(data.statusCode)) {
|
||||
|
Reference in New Issue
Block a user