Mercurial > hg > orthanc
diff OrthancServer/Sources/ServerToolbox.cpp @ 4627:f7d5372b59b3 db-changes
handling revisions of attachments
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 20 Apr 2021 15:11:59 +0200 |
parents | 95ffe3b6ef7c |
children | 66109d24d26e |
line wrap: on
line diff
--- a/OrthancServer/Sources/ServerToolbox.cpp Mon Apr 19 10:28:43 2021 +0200 +++ b/OrthancServer/Sources/ServerToolbox.cpp Tue Apr 20 15:11:59 2021 +0200 @@ -165,7 +165,8 @@ // Get the DICOM file attached to some instances in the resource FileInfo attachment; - if (!transaction.LookupAttachment(attachment, instance, FileContentType_Dicom)) + int64_t revision; + if (!transaction.LookupAttachment(attachment, revision, instance, FileContentType_Dicom)) { throw OrthancException(ErrorCode_InternalError, "Cannot retrieve the DICOM file associated with instance " + @@ -294,7 +295,8 @@ ServerContext::DicomCacheLocker locker(context, *it); // Delay the reconstruction of DICOM-as-JSON to its next access through "ServerContext" - context.GetIndex().DeleteAttachment(*it, FileContentType_DicomAsJson); + context.GetIndex().DeleteAttachment( + *it, FileContentType_DicomAsJson, false /* no revision */, -1 /* dummy revision */); context.GetIndex().ReconstructInstance(locker.GetDicom()); }