# HG changeset patch # User Alain Mazy # Date 1790263361 -7200 # Node ID be63ecbe0bca654a3b54f3ee6539ed3afe9fe7c3 # Parent 0da07ce09f9d56e6a8352148a4ea74c1c5737a04 fixed handling of DicomModalities.LocalAet handling in /modalities/../find-worklists diff -r 0da07ce09f9d -r be63ecbe0bca NEWS --- a/NEWS Thu Sep 24 14:57:18 2026 +0200 +++ b/NEWS Thu Sep 24 17:22:41 2026 +0200 @@ -24,6 +24,8 @@ * Now rejecting Storage Commitment Report (N-EVENT-REPORT) if they don't perfectly match the request initiated by Orthanc (N-ACTION) * Added more tolerance to invalid OW value representations +* Fixed handling of "DicomModalities.LocalAet" handling in /modalities/../find-worklists + (https://discourse.orthanc-server.org/t/find-worklist-with-localaet-from-modality-configuration/6482) * Fix use of the static runtime under Visual Studio (/MT), which broke in 1.12.10 * New CMake options: - "THIRD_PARTY_DOWNLOADS_ROOT_URL" to specify another webserver to downloads the third-parties from. diff -r 0da07ce09f9d -r be63ecbe0bca OrthancServer/Sources/OrthancRestApi/OrthancRestModalities.cpp --- a/OrthancServer/Sources/OrthancRestApi/OrthancRestModalities.cpp Thu Sep 24 14:57:18 2026 +0200 +++ b/OrthancServer/Sources/OrthancRestApi/OrthancRestModalities.cpp Thu Sep 24 17:22:41 2026 +0200 @@ -80,11 +80,16 @@ static DicomAssociationParameters GetAssociationParameters(RestApiPostCall& call, const Json::Value& body) { - const std::string& localAet = - OrthancRestApi::GetContext(call).GetDefaultLocalApplicationEntityTitle(); const RemoteModalityParameters remote = MyGetModalityUsingSymbolicName(call.GetUriComponent("id", "")); + std::string localAet = OrthancRestApi::GetContext(call).GetDefaultLocalApplicationEntityTitle(); // from the global configuration file + if (remote.HasLocalAet()) // from the "DicomModalities" configuration + { + localAet = remote.GetLocalAet(); + } + localAet = Toolbox::GetJsonStringField(body, KEY_LOCAL_AET, localAet); // from the payload + DicomAssociationParameters params(localAet, remote); InjectAssociationTimeout(params, body);