Skip to content

Commit

Permalink
fixed edit submission bug
Browse files Browse the repository at this point in the history
  • Loading branch information
LotteHofstede committed Dec 20, 2019
1 parent 01ba97a commit b510894
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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();
}

Expand All @@ -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)) {
Expand Down

0 comments on commit b510894

Please sign in to comment.