Skip to content

Commit d03c640

Browse files
committed
Merge remote-tracking branch 'atmire-github/fix-submission-lost-changes-after-save-7.6' into fix-submission-lost-changes-after-save-8.0.0-next
2 parents e96ca2f + 06025e4 commit d03c640

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/app/core/json-patch/json-patch-operations.service.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ describe('JsonPatchOperationsService test suite', () => {
156156
});
157157

158158
it('should send a new SubmissionPatchRequest', () => {
159-
const expected = new SubmissionPatchRequest(requestService.generateRequestId(), resourceHref, patchOpBody);
159+
const expected = new SubmissionPatchRequest(requestService.generateRequestId(), resourceHref + '?embed=item', patchOpBody);
160160
scheduler.schedule(() => service.jsonPatchByResourceType(resourceEndpoint, resourceScope, testJsonPatchResourceType).subscribe());
161161
scheduler.flush();
162162

@@ -246,7 +246,7 @@ describe('JsonPatchOperationsService test suite', () => {
246246
});
247247

248248
it('should send a new SubmissionPatchRequest', () => {
249-
const expected = new SubmissionPatchRequest(requestService.generateRequestId(), resourceHref, patchOpBody);
249+
const expected = new SubmissionPatchRequest(requestService.generateRequestId(), resourceHref + '?embed=item', patchOpBody);
250250
scheduler.schedule(() => service.jsonPatchByResourceID(resourceEndpoint, resourceScope, testJsonPatchResourceType, testJsonPatchResourceId).subscribe());
251251
scheduler.flush();
252252

src/app/core/json-patch/json-patch-operations.service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ import {
3737
} from './json-patch-operations.actions';
3838
import { JsonPatchOperationsResourceEntry } from './json-patch-operations.reducer';
3939
import { jsonPatchOperationsByResourceType } from './selectors';
40+
import { URLCombiner } from '../url-combiner/url-combiner';
4041

4142
/**
4243
* An abstract class that provides methods to make JSON Patch requests.
@@ -144,7 +145,7 @@ export abstract class JsonPatchOperationsService<ResponseDefinitionDomain, Patch
144145
* instance of PatchRequestDefinition
145146
*/
146147
protected getRequestInstance(uuid: string, href: string, body?: any): PatchRequestDefinition {
147-
return new this.patchRequestConstructor(uuid, href, body);
148+
return new this.patchRequestConstructor(uuid, new URLCombiner(href, '?embed=item').toString(), body);
148149
}
149150

150151
protected getEndpointByIDHref(endpoint, resourceID): string {

0 commit comments

Comments
 (0)