diff --git a/dispatch/target_types/folder.py b/dispatch/target_types/folder.py index 3d92c40..1d5a5b0 100644 --- a/dispatch/target_types/folder.py +++ b/dispatch/target_types/folder.py @@ -23,7 +23,7 @@ def send_to_target(self, task_id: str, target: FolderTarget, dispatch_info: Task # send dicoms in source-folder to target folder new_folder = Path(target.folder) / str(uuid.uuid4()) if target.file_filter: - shutil.copytree(source_folder, new_folder, ignore=shutil.ignore_patterns(target.file_filter)) + shutil.copytree(source_folder, new_folder, ignore=shutil.ignore_patterns(*target.file_filter.split(","))) else: shutil.copytree(source_folder, new_folder) (new_folder / ".complete").touch() diff --git a/routing/route_series.py b/routing/route_series.py index 6802d82..dbbc8bd 100755 --- a/routing/route_series.py +++ b/routing/route_series.py @@ -474,7 +474,7 @@ def push_serieslevel_outgoing( # Determine if the files should be copied or moved. If only one rule triggered, files can # safely be moved, otherwise files will be moved and removed in the end move_operation = False - if len(selected_targets) == 1: + if len(triggered_rules) == 1: move_operation = True for i,target in enumerate(selected_targets): @@ -519,6 +519,7 @@ def push_serieslevel_outgoing( operation: Callable is_operation_move = False + if move_operation: # If there are more targets for one rule, then move the files only for the last target if i==len(selected_targets)-1: diff --git a/webinterface/templates/targets/folder-edit.html b/webinterface/templates/targets/folder-edit.html index 9686275..3e9ed3a 100755 --- a/webinterface/templates/targets/folder-edit.html +++ b/webinterface/templates/targets/folder-edit.html @@ -10,10 +10,10 @@