Commit c59e9360 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

make hasLineContent() faster.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23729 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2a602630
......@@ -76,7 +76,12 @@ class OrderLine(DeliveryLine):
try:
result = transactional_variable[call_method_key]
except KeyError:
result = len(self.contentValues(meta_type=self.meta_type)) > 0
result = False
meta_type = self.meta_type
for i in self.objectValues():
if i.meta_type==meta_type:
result = True
break
transactional_variable[call_method_key] = result
return result
......
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