Commit 8f125bb8 authored by Sebastien Robin's avatar Sebastien Robin

2008-09-30 Seb

* Raise Error with nice message when no source is found on a task instead

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23910 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3670c0b5
......@@ -113,6 +113,11 @@ monthly_worker_quantity_dict = {} # Used to get quantity per month and per worke
for task_line in task_line_list:\n
# initialize some variables\n
source = task_line.getSource()\n
if source is None:\n
# This should not happens, so display an error message\n
raise ValueError, context.Base_translateString(\\\n
"This task should have a source : ${task_relative_url}",\n
mapping = {\'task_relative_url\': task.getRelativeUrl()})\n
source_title = task_line.getSourceTitle()\n
start_date_task = task_line.getStartDate()\n
stop_date_task = task_line.getStopDate()\n
......@@ -254,6 +259,7 @@ return context.Project_viewODSMonthlyReport()\n
<string>monthly_worker_quantity_dict</string>
<string>task_line</string>
<string>source</string>
<string>ValueError</string>
<string>source_title</string>
<string>start_date_task</string>
<string>stop_date_task</string>
......
608
\ No newline at end of file
610
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment