fix prefilling with a python formula

This commit is contained in:
Frédéric Péters 2012-07-16 10:04:59 +02:00
parent 0521e128d6
commit 518f039460
1 changed files with 1 additions and 0 deletions

View File

@ -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))