Mercurial > hg > orthanc-book
changeset 1191:44700cfa7656
fixed auto routing bug (DW) in Python page
author | Benoit Crickboom <bc@orthanc.team> |
---|---|
date | Sat, 16 Aug 2025 13:18:17 +0200 |
parents | 7492a3915bf2 |
children | 211d3cf87e6d |
files | Sphinx/source/plugins/python/autorouting-2.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/Sphinx/source/plugins/python/autorouting-2.py Thu Aug 14 18:30:44 2025 +0200 +++ b/Sphinx/source/plugins/python/autorouting-2.py Sat Aug 16 13:18:17 2025 +0200 @@ -1,8 +1,10 @@ import orthanc +import json def OnChange(changeType, level, resourceId): if changeType == orthanc.ChangeType.STABLE_STUDY: print('Stable study: %s' % resourceId) - orthanc.RestApiPostAfterPlugins('/dicom-web/servers/sample/store', resourceId) + payload = { "Resources" : [resourceId] } + orthanc.RestApiPostAfterPlugins('/dicom-web/servers/sample/stow', payload) orthanc.RegisterOnChangeCallback(OnChange)