Skip to content

Commit

Permalink
re #8970 Check ws belongs to group before inserting it
Browse files Browse the repository at this point in the history
This get rids of warning message in SANS reduction due to inserting
workspace to a group which already had that workspace.
  • Loading branch information
gesnerpassos authored and RussellTaylor committed Feb 25, 2014
1 parent a294342 commit 537dd03
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Code/Mantid/scripts/SANS/isis_reduction_steps.py
Expand Up @@ -430,8 +430,9 @@ def _keep_partial_results(self, sample_name, can_name):
gp_name = 'sample_can_reductions'
if mtd.doesExist(gp_name):
gpr = mtd[gp_name]
gpr.add(sample_name)
gpr.add(can_name)
for wsname in [sample_name, can_name]:
if not gpr.contains(wsname):
gpr.add(wsname)
else:
GroupWorkspaces([sample_name, can_name], OutputWorkspace=gp_name)

Expand Down

0 comments on commit 537dd03

Please sign in to comment.