This is an automated email from the ASF dual-hosted git repository.

martinzink pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git

commit b525cc86191fae6968fe38bc767f6e32e2899b19
Author: Marton Szasz <[email protected]>
AuthorDate: Wed Feb 25 14:52:08 2026 +0100

    MINIFICPP-2725 python: fix EL with ENVIRONMENT scope
    
    i.e. evaluation with no FlowFile context
    
    Closes #2114
    
    Signed-off-by: Martin Zink <[email protected]>
---
 extensions/python/pythonprocessors/nifiapi/properties.py | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/extensions/python/pythonprocessors/nifiapi/properties.py 
b/extensions/python/pythonprocessors/nifiapi/properties.py
index aafb0b060..3cbd4c58c 100644
--- a/extensions/python/pythonprocessors/nifiapi/properties.py
+++ b/extensions/python/pythonprocessors/nifiapi/properties.py
@@ -266,11 +266,9 @@ class PythonPropertyValue:
         if not self.el_supported or not self.value:
             return self
 
-        new_string_value = None
-        if self.is_dynamic:
-            new_string_value = self.cpp_context.getDynamicProperty(self.name, 
flow_file.cpp_flow_file)
-        else:
-            new_string_value = self.cpp_context.getProperty(self.name, 
flow_file.cpp_flow_file)
+        getter = self.cpp_context.getDynamicProperty if self.is_dynamic else 
self.cpp_context.getProperty
+        args = () if flow_file is None else (flow_file.cpp_flow_file,)
+        new_string_value = getter(self.name, *args)
         return PythonPropertyValue(self.cpp_context, self.name, 
new_string_value, self.el_supported, self.controller_service_definition, 
self.is_dynamic)
 
     def asControllerService(self):

Reply via email to