Commit adea575f authored by Vincent Pelletier's avatar Vincent Pelletier

Do not use id as a catalog search criterion. It's a performance crime.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22593 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7b7dee31
......@@ -105,12 +105,8 @@ if listbox is not None:\n
\n
\n
# Set a reference\n
site_id = counter_date.getSiteId()\n
if site_id is None:\n
msg = Message(domain=\'ui\',message="You must define the site")\n
raise ValidationFailed (msg,)\n
counter_date_list = [x.getObject() for x in context.portal_catalog(\n
portal_type=\'Counter Date\',site_id=site_id,\n
portal_type=\'Counter Date\',site_uid=site_uid,\n
sort_on=[(\'start_date\',\'descending\')],limit=1,\n
simulation_state=(\'open\',\'closed\'))]\n
previous_reference = None\n
......@@ -193,7 +189,6 @@ counter_date.setReference(reference)\n
<string>line</string>
<string>context</string>
<string>counter</string>
<string>site_id</string>
<string>previous_reference</string>
<string>len</string>
<string>previous_counter_date</string>
......
442
\ No newline at end of file
445
\ 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