Commit 576c3283 authored by Fabien Morin's avatar Fabien Morin

add a condition to return None if the slice is not found

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25134 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5f980105
...@@ -9,22 +9,10 @@ ...@@ -9,22 +9,10 @@
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>Script_magic</string> </key> <key> <string>Script_magic</string> </key>
<value> <int>3</int> </value> <value> <int>3</int> </value>
</item> </item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>_bind_names</string> </key> <key> <string>_bind_names</string> </key>
<value> <value>
...@@ -93,6 +81,10 @@ yearly_slice_amount = 0\n ...@@ -93,6 +81,10 @@ yearly_slice_amount = 0\n
# get the slice value for this paysheet :\n # get the slice value for this paysheet :\n
model = context.getSpecialiseValue()\n model = context.getSpecialiseValue()\n
slice = model.getCell(slice_path)\n slice = model.getCell(slice_path)\n
\n
if not slice:\n
return None\n
\n
plafond = slice.getQuantityRangeMax()\n plafond = slice.getQuantityRangeMax()\n
\n \n
gross_salary = context.PaySheetTransaction_getAmountFromBaseParticipationList(\\\n gross_salary = context.PaySheetTransaction_getAmountFromBaseParticipationList(\\\n
...@@ -131,12 +123,6 @@ return yearly_slice_amount\n ...@@ -131,12 +123,6 @@ return yearly_slice_amount\n
<none/> <none/>
</value> </value>
</item> </item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>slice_path</string> </value> <value> <string>slice_path</string> </value>
...@@ -179,13 +165,13 @@ return yearly_slice_amount\n ...@@ -179,13 +165,13 @@ return yearly_slice_amount\n
<string>yearly_slice_amount</string> <string>yearly_slice_amount</string>
<string>model</string> <string>model</string>
<string>slice</string> <string>slice</string>
<string>None</string>
<string>plafond</string> <string>plafond</string>
<string>gross_salary</string> <string>gross_salary</string>
<string>slice_amount</string> <string>slice_amount</string>
<string>_inplacevar_</string> <string>_inplacevar_</string>
<string>_getiter_</string> <string>_getiter_</string>
<string>paysheet</string> <string>paysheet</string>
<string>None</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
69 70
\ No newline at end of file \ No newline at end of file
...@@ -3,4 +3,4 @@ portal_categories/salary_range/france/tranche_1 ...@@ -3,4 +3,4 @@ portal_categories/salary_range/france/tranche_1
portal_categories/salary_range/france/tranche_2 portal_categories/salary_range/france/tranche_2
portal_categories/salary_range/france/tranche_a portal_categories/salary_range/france/tranche_a
portal_categories/salary_range/france/tranche_b portal_categories/salary_range/france/tranche_b
portal_categories/salary_range/france/tranche_c portal_categories/salary_range/france/tranche_c
\ 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