Still receiving same error...
This is my html code:
I'm taking values from jstree and then putting them into a database (trying
to at least)
$("#btn").click(function () {
var checked = $('#tree').jstree(true).get_selected();
var testid = $('#test_id').val();
console.log(checked)
ajax('{{=URL('test_1')}}' +'?checked=' + checked +
'?test_id='+testid, [], ':eval');
});
}
and my test_1 function
def test_1():
value = request.vars.checked
record_ids = [long(s) for s in re.findall('var_([0-9]*)', value)]
test_id = re.findall('\?test_id=(.*)', value)[0]
file_ids = [x.id for x in s if int(x) in record_ids]
db.file_groups.insert(group_name=test_id, filename=file_ids)
session.test = file_ids, test_id
# handle the variable
redirect(URL('run', args=value), client_side=True)
On Monday, October 2, 2017 at 8:48:13 PM UTC-4, LoveWeb2py wrote:
>
> Okay, just delete the table and then set migrate=True ?
>
> On Monday, October 2, 2017 at 8:46:21 PM UTC-4, Anthony wrote:
>>
>> On Monday, October 2, 2017 at 7:57:19 PM UTC-4, LoveWeb2py wrote:
>>>
>>> Yes... I believe so.
>>>
>>> On Monday, October 2, 2017 at 7:53:13 PM UTC-4, Anthony wrote:
>>>>
>>>> Was that field originally a regular reference field and then you
>>>> changed it to a list:reference field?
>>>>
>>>
>> I think that's the problem. Try re-creating the table (save the data to
>> re-import).
>>
>> Anthony
>>
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.