﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
2483	sqlite3 not processing paramaters?	Bryan Newbold <bnewbold@…>	Adrian Holovaty	"When overriding the generic update_object method like so:
{{{
def update_item(request, model, object_id=None, slug=None,
        slug_field=None, template_name=None, template_loader=loader,
        extra_context=None, post_save_redirect=None,
        login_required=False, follow=None, context_processors=None,
        template_object_name='object'):
    if request.POST:
        i = Item.objects.get(pk=object_id)
        new_data = request.POST.copy()
        new_data['type'] = str(i.type_id)
        new_data['name'] = i.name
        new_data['added_date_time'] = time.strftime('%H:%M')
        new_data['added_date_date'] = time.strftime('%Y-%m-%d')
        request.POST = new_data

    return update_object(request, model, object_id, slug,
            slug_field, template_name, template_loader,
            extra_context, post_save_redirect,
            login_required, follow, context_processors,
            template_object_name)
}}}

I get an OperationalError with sqlite... the problem is the database query:
{{{
query = 'UPDATE ""items_item"" SET ""name""=?,""type_id""=?,""status_id""=?,""added_date""=?,""giver""=?,""taker""=?,""checkedout_date""=?,""id_left_id""=?,""description""=?,""image""=? WHERE ""id""=?'
}}}

looking up a step in the stack, there's:
{{{
params=('Adaptation', '1', '1', '2006-08-04 17:23:00', None, 'asdf', None, '1', None, None, 1)
}}}
 and 
{{{
'UPDATE ""items_item"" SET ""name""=%s,""type_id""=%s,""status_id""=%s,""added_date""=%s,""giver""=%s,""taker""=%s,""checkedout_date""=%s,""id_left_id""=%s,""description""=%s,""image""=%s WHERE ""id""=%s'
}}}

The current converty_query method in sqlite3 is:
{{{
def convert_query(self, query, num_params):
        return query % tuple(""?"" * num_params)
}}}

Which doesn't make any sense to me... shouldn't it be populating the query with the parameters? Am I just lost? Should the query be handled earlier on? "	defect	closed	Database layer (models, ORM)	dev	major	invalid	sqlite		Unreviewed	0	0	0	0	0	0
