fix: error in InformationCalculation errors

This commit is contained in:
egarette@silique.fr 2025-10-03 22:41:38 +02:00
parent 8bf07735b8
commit e8c692d39c
5 changed files with 28 additions and 2 deletions

View file

@ -829,12 +829,12 @@ class InformationCalculation(Calculation):
msg = _(
'cannot find variable "{0}" for the information "{1}" when calculating "{2}"'
).format(self.variable, self.information, self.attribute_name)
raise DictConsistencyError(msg, 40, variable.xmlfiles)
raise DictConsistencyError(msg, 40, self.xmlfiles)
if identifier is not None:
msg = _(
'identifier not allowed for the information "{0}" when calculating "{1}"'
).format(self.information, self.attribute_name)
raise DictConsistencyError(msg, 41, variable.xmlfiles)
raise DictConsistencyError(msg, 41, self.xmlfiles)
if variable:
params[None][0]["variable"] = variable
if self.default_values:

View file

@ -0,0 +1,17 @@
---
version: 1.1
fam_{{ identifier }}:
description: my dyn family
dynamic:
- var1
- var2
var:
var2:
description: my var 2
default:
type: information
information: info
variable: _.fam_var1.var

View file

@ -0,0 +1,9 @@
---
version: 1.1
var:
description: my var
default:
type: information
information: info
variable: a.unknown.variable