Commit 39ff89e7 authored by Julien Muchembled's avatar Julien Muchembled

Really fix relation strings field with "my_<base_category>" id (cf r27364).


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27369 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a3bac570
...@@ -65,12 +65,11 @@ if pieces[-1] == \'list\':\n ...@@ -65,12 +65,11 @@ if pieces[-1] == \'list\':\n
pieces.pop()\n pieces.pop()\n
\n \n
# can it be translated title, or something else?\n # can it be translated title, or something else?\n
if pieces[-2:] == (\'relative\', \'url\'):\n if pieces[-1] == \'title\':\n
idx = -2\n
elif pieces[-1] == \'title\':\n
idx = -1\n idx = -1\n
else:\n else:\n
idx = len(pieces)\n idx = -2\n
pieces += \'relative\', \'url\'\n
\n \n
return {\'base_category\': \'_\'.join(pieces[:idx]),\n return {\'base_category\': \'_\'.join(pieces[:idx]),\n
\'catalog_index\': \'_\'.join(pieces[idx:])}\n \'catalog_index\': \'_\'.join(pieces[idx:])}\n
...@@ -115,7 +114,7 @@ return {\'base_category\': \'_\'.join(pieces[:idx]),\n ...@@ -115,7 +114,7 @@ return {\'base_category\': \'_\'.join(pieces[:idx]),\n
<string>pieces</string> <string>pieces</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>idx</string> <string>idx</string>
<string>len</string> <string>_inplacevar_</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
1217 1218
\ No newline at end of file \ 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