fix prefilling with a python formula
This commit is contained in:
parent
0521e128d6
commit
518f039460
|
@ -441,6 +441,7 @@ class FormPage(Directory):
|
|||
v = user.form_data.get(x)
|
||||
break
|
||||
elif t == 'formula':
|
||||
formula = field.prefill.get('value')
|
||||
variables = get_publisher().substitutions.get_context_variables()
|
||||
try:
|
||||
v = str(eval(formula, variables))
|
||||
|
|
Loading…
Reference in New Issue