Making sure that we are not accidentally overwriting an existing resource with the same ID from another IG by comparing identifier, url or whatever constitutes uniqueness.

This commit is contained in:
Jens Kristian Villadsen 2024-09-16 15:45:20 +02:00
parent 02d38bce14
commit 72ba7cd1c2
1 changed files with 2 additions and 1 deletions

View File

@ -497,9 +497,10 @@ public class PackageInstallerSvcImpl implements IPackageInstallerSvc {
IIdType id = theResource.getIdElement();
RequestDetails requestDetails = createRequestDetails();
String query = createSearchParameterMapFor(theResource).toNormalizedQueryString(myFhirContext);
try {
outcome = theDao.update(theResource, requestDetails);
outcome = theDao.update(theResource, query, requestDetails);
} catch (ResourceVersionConflictException exception) {
final Optional<IBaseResource> optResource = readResourceById(theDao, id);