diff OrthancServer/Sources/ServerContext.cpp @ 5147:19ccae2e0371

Fix issue #212 (Anonymization process transcodes data and loses resource link)
author Alain Mazy <am@osimis.io>
date Fri, 27 Jan 2023 11:49:28 +0100
parents 7547c7dfd017
children 2df546a76e17
line wrap: on
line diff
--- a/OrthancServer/Sources/ServerContext.cpp	Fri Jan 27 11:25:56 2023 +0100
+++ b/OrthancServer/Sources/ServerContext.cpp	Fri Jan 27 11:49:28 2023 +0100
@@ -819,11 +819,7 @@
 
           std::unique_ptr<DicomInstanceToStore> toStore(DicomInstanceToStore::CreateFromParsedDicomFile(*tmp));
           toStore->SetOrigin(dicom->GetOrigin());
-
-          if (isReconstruct) // the initial instance to store already has its own metadata
-          {
-            toStore->CopyMetadata(dicom->GetMetadata());
-          }
+          toStore->CopyMetadata(dicom->GetMetadata());
 
           StoreResult result = StoreAfterTranscoding(resultPublicId, *toStore, mode, isReconstruct);
           assert(resultPublicId == tmp->GetHasher().HashInstance());