the error is not in the above code. Can you post the exact model and
action?

On Jul 21, 8:09 am, Vidul Petrov <[email protected]> wrote:
> Hi all,
>
> I am trying to insert default value in "some_table" for new users:
>
> # init/controllers/default.py
> def __insert_default_val(form):
>     db.some_table.insert(val1=1, val2=2, created_by=form.vars.id)
>
> auth.settings.register_onaccept = __insert_default_val
>
> but I get the following exception:
>
> "... sqlhtml.py", line 997, in accepts
>     fields[fieldname] = int(fields[fieldname])
> ValueError: invalid literal for int() with base 10: ''
>
> Any ideas for a possible fix?

Reply via email to