Commit ccdf3ddb authored by Georgios Dagkakis's avatar Georgios Dagkakis

erp5_web: Fixup Alarm_processIngestedWebMessageList

with previous implementation, categories_list=[...] could be included
and it would delete existing categories not included in it

So use getPropertyAndCategoryList instead of propertyIds,
that should return a cleaner list for input_parameter_dict here
parent ff08d335
Pipeline #15565 passed with stage
in 0 seconds
from erp5.component.module.MovementCollectionDiff import getPropertyAndCategoryList
portal = context.getPortalObject() portal = context.getPortalObject()
for path in path_list: for path in path_list:
document = portal.restrictedTraverse(path) document = portal.restrictedTraverse(path)
# Useful to reproduce Ingestion process from beginning # Useful to reproduce Ingestion process from beginning
# All properties of object are considered as user input # All properties of object are considered as user input
input_parameter_dict = {'portal_type': document.getPortalType()} input_parameter_dict = {'portal_type': document.getPortalType()}
for property_id in document.propertyIds(): input_parameter_dict.update(getPropertyAndCategoryList(document))
if property_id not in ('portal_type', 'uid', 'id',) \
and document.hasProperty(property_id):
input_parameter_dict[property_id] = document.getProperty(property_id)
filename = document.getFilename() filename = document.getFilename()
# Now starts metadata discovery process # Now starts metadata discovery process
......
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