Skip to content

Commit

Permalink
fix merge issues
Browse files Browse the repository at this point in the history
  • Loading branch information
barhodes committed Sep 17, 2024
1 parent 5b1495b commit 758811a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public static IBaseBackboneElement createEntry(IBaseResource resource, boolean i

public static IBaseBackboneElement deleteEntry(IBaseResource resource) {
final var fhirVersion = resource.getStructureFhirVersionEnum();
final var entry = BundleHelper.newEntryWithResource(resource.getStructureFhirVersionEnum(), resource);
final var entry = BundleHelper.newEntryWithResource(resource);
var requestUrl = resource.fhirType() + "/" + resource.getIdElement().getIdPart();

final var request = BundleHelper.newRequest(fhirVersion, "DELETE", requestUrl);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ public <T extends IBaseResource, I extends IIdType> MethodOutcome delete(
var resources = resourceMap.computeIfAbsent(id.getResourceType(), r -> new HashMap<>());
var keyId = id.toUnqualifiedVersionless();
if (resources.containsKey(keyId)) {
outcome.setResource(resources.get(keyId));
resources.remove(keyId);
} else {
throw new ResourceNotFoundException("Resource not found with id " + id);
Expand Down Expand Up @@ -237,7 +238,7 @@ public static <B extends IBaseBundle> B transactionStub(B transaction, Repositor
var res = repository.delete(
resourceClass,
BundleHelper.getEntryRequestId(version, e).get().withResourceType(resourceType));
BundleHelper.addEntry(returnBundle, BundleHelper.newEntryWithResource(version, res.getResource()));
BundleHelper.addEntry(returnBundle, BundleHelper.newEntryWithResource(res.getResource()));
} else {
throw new ResourceNotFoundException("Trying to delete an entry without id");
}
Expand Down

0 comments on commit 758811a

Please sign in to comment.