You're right !
I thought it doesn't matter but it does.

I define another table which has a same field type for key and
works !!
But I employee table doesn't work even I changed from 'string' to
'double'

"SyntaxError: user is tampering with form's record_id:
{'EmployeeCode': '61339.00'} != {'EmployeeCode': Decimal('61339')}"

Model
---------------------------------
db.define_table('Dept',
    Field('DeptCode'),
    Field('DeptName'),
    primarykey=['DeptCode'])

Controller
---------------------------------
def index():
    form = form=crud.update(db.Dept,db.Dept(db.Dept.DeptCode=='J12'))
    return dict(form=form)





On Feb 9, 11:46 am, Niphlod <niph...@gmail.com> wrote:
> uhm, this is the relevant part for the form I was asking for
>
> <input name="_formkey" type="hidden"
> value="ce992b3a79f9c18f92ec284b9bd443af"><input name="_formname"
> type="hidden" value="Employee/{&#39;EmployeeCode&#39;:
> Decimal(&#39;61339&#39;)}">
>
> for the "session" , just put {{=BEAUTIFY(session)}} into the template and
> watch the keys ....
>
> Here the strange part is that it seems that employee code is not an integer
> as defined into the model but a decimal. I don't know if this is the actual
> problem, but it is different from the "normal" way.
>
> Waiting for the session data to see if formkey is different or equal, that
> is the problem I was addressing in the previous message.

Reply via email to