Re: object.save() executes a .filter() somewhere

2009-10-27 Thread Gerard
It works when I disable "use_for_related_fields = True". Would it be safe to disable this and simply manage the reverses myself? Regards, Gerard. PS: Sorry for the spam :) Gerard wrote: > Looking at the trace, the filter executed without a user is this one: > > File "/usr/lib/python2.5/site

Re: object.save() executes a .filter() somewhere

2009-10-27 Thread Gerard
Looking at the trace, the filter executed without a user is this one: File "/usr/lib/python2.5/site-packages/django/db/models/base.py" in save_base 470. manager.filter(pk=pk_val).extra(select={'a': 1}).values('a').order_by())): Overwriting save_base feels like I'm div

object.save() executes a .filter() somewhere

2009-10-27 Thread Gerard
Hi all, I'm totally in the dark atm. I save an object in the following way: if form.is_valid(): order = form.save(commit=False) order.owner = request.user order.save() # << breaks I get the following error: AttributeError at /order/2/edit 'ValuesQuerySet' object