fix: UserDatas, do now set modified option in second round

This commit is contained in:
egarette@silique.fr 2025-06-20 07:51:35 +03:00
parent 06c87718d6
commit bed7a1d3b5

View file

@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
from typing import List
from re import findall
from tiramisu import Calculation
from tiramisu import Calculation, owners
from tiramisu.error import (
PropertiesOptionError,
AttributeOptionError,
@ -46,11 +46,13 @@ class UserDatas:
*,
return_values_not_error=False,
user_datas_type: str="user_datas",
only_default: bool=False,
):
self.values = {}
self.errors = []
self.warnings = []
self.show_secrets = False
self.only_default = only_default
if user_datas_type == "user_datas":
self._populate_values(user_datas)
else:
@ -198,6 +200,9 @@ class UserDatas:
path = option.path()
if path not in self.values:
continue
if self.only_default and option.owner.get() != owners.default:
self.values.pop(path)
continue
options = self.values[path].get("options", {})
if (
options.get("allow_secrets_variables", True) is False