Skip to content

Commit 2be03e4

Browse files
peterbrookask
authored andcommitted
Ensure that subtask argument updating in chain and group respects subtask immutability
1 parent c5aa1c7 commit 2be03e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

celery/canvas.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ def from_dict(self, d):
298298
tasks = d['kwargs']['tasks']
299299
if d['args'] and tasks:
300300
# partial args passed on to first task in chain (Issue #1057).
301-
tasks[0]['args'] = d['args'] + tasks[0]['args']
301+
tasks[0]['args'] = tasks[0]._merge(d['args'])[0]
302302
return chain(*d['kwargs']['tasks'], **kwdict(d['options']))
303303

304304
@property
@@ -409,7 +409,7 @@ def from_dict(self, d):
409409
if d['args'] and tasks:
410410
# partial args passed on to all tasks in the group (Issue #1057).
411411
for task in tasks:
412-
task['args'] = d['args'] + task['args']
412+
task['args'] = task._merge(d['args'])[0]
413413
return group(tasks, **kwdict(d['options']))
414414

415415
def __call__(self, *partial_args, **options):

0 commit comments

Comments
 (0)