Hello, I'm trying to create a simple interface that allows users to select multiple files and create a name for the bundle. I've followed the example in the book but keep getting the same error... FOREIGN KEY constraint failed.
When I look in all_files, it has the keys available.
I am wondering if it has something to do with the filetype being an upload field.
I've even tried getting the reference object id by doing
s = db(db.all_files.id>0).select()
file_ids = [x.id for x in s if int(x) in all_files]
name = 'test_group_name'
file_ids = [1L, 2L, 3L]
db.file_groups.insert(group_name=test_id, filename=file_ids)
Function argument list
(self=<pydal.adapters.sqlite.SQLite object>, table=<Table file_groups (id, group_name, filename)>, fields=[(<pydal.objects.Field object>, [27, 28, 29, 33, 34, 31, 30, 32, 35, 36]), (<pydal.objects.Field object>, 'filegroup1')])
db.define_table('all_files',
Field('filename','upload', unique=True),
Field('uploaded_by', db.auth_user),
format="%(filename)s")
db.define_table('file_groups',
Field('group_name'),
Field('filename', 'list:reference all_files'))
Sincerely appreciate any help...