Commit 0a053876 authored by Tatuya Kamada's avatar Tatuya Kamada

erp5_wendelin: Use version instead of validation_state='default'

parent d4956cde
...@@ -89,14 +89,8 @@ if data_ingestion is None: ...@@ -89,14 +89,8 @@ if data_ingestion is None:
specialise_value_list = [x.getObject() for x in portal_catalog.searchResults( specialise_value_list = [x.getObject() for x in portal_catalog.searchResults(
portal_type = 'Data Supply', portal_type = 'Data Supply',
reference = specialise_reference, reference = specialise_reference,
validation_state = 'validated')] validation_state = 'validated',
sort_on=(('version', 'descending')))]
# if we do not find a validated data supply, we look for a default data supply
if not specialise_value_list:
specialise_value_list = [x.getObject() for x in portal_catalog.searchResults(
portal_type = 'Data Supply',
reference = specialise_reference,
validation_state = 'default')]
# create a new data ingestion # create a new data ingestion
data_ingestion = portal.data_ingestion_module.newContent( data_ingestion = portal.data_ingestion_module.newContent(
......
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