From d895c46729b4c91c599d074bff4d76bb0b2b481c Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Fri, 19 Mar 2021 10:15:34 +0100 Subject: [PATCH] auto_freeze is now allowed in extra --- src/rougail/annotator/condition.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/rougail/annotator/condition.py b/src/rougail/annotator/condition.py index d0cc54f0a..f8f6f8fc7 100644 --- a/src/rougail/annotator/condition.py +++ b/src/rougail/annotator/condition.py @@ -50,6 +50,7 @@ class ConditionAnnotator(TargetAnnotator, ParamAnnotator, Walk): return self.target_is_uniq = False self.only_variable = False + self.allow_function = False self.convert_target(self.objectspace.space.constraints.condition) self.check_condition_optional() self.convert_condition_source() @@ -74,9 +75,9 @@ class ConditionAnnotator(TargetAnnotator, ParamAnnotator, Walk): for variable in self.get_variables(): if not variable.auto_freeze and not variable.auto_save: continue - if variable.namespace != self.objectspace.rougailconfig['variable_namespace']: - msg = _(f'auto_freeze is not allowed in extra "{variable.namespace}"') - raise DictConsistencyError(msg, 49, variable.xmlfiles) + #if variable.namespace != self.objectspace.rougailconfig['variable_namespace']: + # msg = _(f'auto_freeze is not allowed in extra "{variable.namespace}"') + # raise DictConsistencyError(msg, 49, variable.xmlfiles) variable.force_store_value = True if variable.auto_save: continue @@ -89,7 +90,7 @@ class ConditionAnnotator(TargetAnnotator, ParamAnnotator, Walk): new_condition.param = [new_param] new_target = self.objectspace.target(variable.xmlfiles) new_target.type = 'variable' - new_target.name = variable.name + new_target.name = variable.path new_condition.target = [new_target] if not hasattr(self.objectspace.space, 'constraints'): self.objectspace.space.constraints = self.objectspace.constraints(variable.xmlfiles)