You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Revalidate everything for all the tasks in the new tasklist
412
413
# This is kind of costly, but we have no choices if special validation
413
414
# modules have been loaded for after_form().
414
415
# As soon as any task in the task list is not valid, we stop checking and
415
416
# return to the form.
416
417
af_messages=""# 'after_form' messages
417
-
tasklist.eachdo |task|
418
+
tasklist.each_with_indexdo |task,idx|
418
419
af_messages += task.wrapper_after_form
419
420
af_messages=af_messages.split("\n").uniq.join("\n")# remove duplicate messages, if any
420
421
nextiftask.errors.empty? && task.valid?# move on to next task if everything ok
421
422
422
-
# Found a faulty task, so inform user and return to launch form.
423
-
@task.errors.add(:base,"While creating a set of tasks, one of them was found to be invalid, probably because a file selected as input was not appropriate.")
423
+
# Found at least one faulty task, so inform user
424
+
task.errors.each{ |key,message| @task.errors.add(key,message)}# copy error messages, if any
425
+
@task.errors.add(:base,"While creating a set of tasks, at least one of them was found to be invalid, probably because a file selected as input was not appropriate.")
0 commit comments