Skip to content
Browse files
Add parameter to decorator in default custom expression function to a…
…void 'No feature was found on this layer to evaluate the expression' message and be able to get a calculated value even on empty layers
  • Loading branch information
gacarrillor committed Apr 9, 2021
1 parent 6df122b commit b9ee50b963e8ec6560d0ee1fc89640287862db43
Showing with 1 addition and 1 deletion.
  1. +1 −1 python/
@@ -66,7 +66,7 @@ def load_user_expressions(path):
template = """from qgis.core import *
from qgis.gui import *
@qgsfunction(args='auto', group='Custom')
@qgsfunction(args='auto', group='Custom', referenced_columns=[])
def my_sum(value1, value2, feature, parent):
Calculates the sum of the two parameters value1 and value2.

0 comments on commit b9ee50b

Please sign in to comment.