mark the function with an attribute to know if entities are expected in arguments

This commit is contained in:
Jakub Trllo 2025-10-03 16:50:57 +02:00
parent 31b023b0fa
commit 16b4584609

View file

@ -277,6 +277,11 @@ def _get_product_name_decorator(func):
The old version expected 'task_name' and 'task_type' arguments. The new
version expects 'folder_entity' and 'task_entity' arguments instead.
"""
# Add attribute to function to identify it as the new function
# so other addons can easily identify it.
# >>> geattr(get_product_name, "use_entities", False)
func.use_entities = True
@wraps(_get_product_name)
def inner(*args, **kwargs):
# ---