Commit 66882b19 authored by Xiaowu Zhang's avatar Xiaowu Zhang Committed by Klaus Wölfel

erp5_wendelin: reindex row data

call reindexObject on temporary object doesn't triggered catalog method: https://lab.nexedi.com/nexedi/erp5/blob/master/product/ERP5Type/mixin/temporary.py#L50, so call directly catalogObjectList on temporary object

example usage: data_array.activate().reindexRows(0, 10000, ('z_catalog_dynamic_duo_raw_array_list',))

/reviewed-on !7
parent d4956cde
......@@ -64,6 +64,12 @@ class DataArray(BigFile):
self._setArray(array)
return array
def reindexRows(self, start_index, stop_index, method_id_list):
self.portal_catalog.catalogObjectList(
[self.asContext(start_index=start_index, stop_index=stop_index)],
method_id_list=method_id_list
)
def getArray(self, default=None):
"""
Get numpy array value.
......
......@@ -46,9 +46,9 @@
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W:133, 42: Redefining built-in \'format\' (redefined-builtin)</string>
<string>W:165, 4: Redefining built-in \'range\' (redefined-builtin)</string>
<string>W:192, 10: No exception type(s) specified (bare-except)</string>
<string>W:139, 42: Redefining built-in \'format\' (redefined-builtin)</string>
<string>W:171, 4: Redefining built-in \'range\' (redefined-builtin)</string>
<string>W:198, 10: No exception type(s) specified (bare-except)</string>
</tuple>
</value>
</item>
......
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