I have added a script via the modeler. When executing the same code in the script, the layers are no longer added with the specified names in QGIS but with the name of tool that was automated. Previously in the Modeler the generated layers were added with the set names.
Does anyone know what the problem is?
Example: Previously the layer was added under the name "step2". Run in the model, it's named "intersection":
alg_params = {
'INPUT': parameters['Flurstuecke'],
'INPUT_FIELDS': [''],
'OVERLAY': outputs['step1']['OUTPUT'],
'OVERLAY_FIELDS': [''],
'OVERLAY_FIELDS_PREFIX': '',
'OUTPUT': parameters['step2']
}
outputs['DivideIntoParcelsStructure'] = processing.run('native:intersection', alg_params, context=context, feedback=feedback, is_child_algorithm=True)
results['step2'] = outputs['DivideIntoParcelsStructure']['OUTPUT']