#11764: Bugfix: typo with avoid.update(..) in
db/models/sql/query.py:BaseQuery:fill_related_selections
------------------------------------------+---------------------------------
 Reporter:  aurelio                       |       Owner:  nobody    
   Status:  new                           |   Milestone:  1.2       
Component:  Database layer (models, ORM)  |     Version:  SVN       
 Keywords:                                |       Stage:  Unreviewed
Has_patch:  1                             |  
------------------------------------------+---------------------------------
 There looks to be a bug due to a typo in db/models/sql/query.py .

 The issue became apparent when it prevented the display of a ForeignKey
 field in list_display, when there is another ForeignKey to the base class
 of the model with the following error displayed:

 {{{

 Caught an exception while rendering: update() takes exactly one argument
 (2 given)

 Original Traceback (most recent call last):
   File "/tippit/django-
 projects/django/Django-1.1/django/template/debug.py", line 71, in
 render_node
     result = node.render(context)
   File "/tippit/django-
 projects/django/Django-1.1/django/template/__init__.py", line 936, in
 render
     dict = func(*args)
   File "/tippit/django-
 projects/django/Django-1.1/django/contrib/admin/templatetags/admin_list.py",
 line 253, in result_list
     'results': list(results(cl))}
   File "/tippit/django-
 projects/django/Django-1.1/django/contrib/admin/templatetags/admin_list.py",
 line 247, in results
     for res in cl.result_list:
   File "/tippit/django-
 projects/django/Django-1.1/django/db/models/query.py", line 106, in
 _result_iter
     self._fill_cache()
   File "/tippit/django-
 projects/django/Django-1.1/django/db/models/query.py", line 692, in
 _fill_cache
     self._result_cache.append(self._iter.next())
   File "/tippit/django-
 projects/django/Django-1.1/django/db/models/query.py", line 238, in
 iterator
     for row in self.query.results_iter():
   File "/tippit/django-
 projects/django/Django-1.1/django/db/models/sql/query.py", line 287, in
 results_iter
     for rows in self.execute_sql(MULTI):
   File "/tippit/django-
 projects/django/Django-1.1/django/db/models/sql/query.py", line 2360, in
 execute_sql
     sql, params = self.as_sql()
   File "/tippit/django-
 projects/django/Django-1.1/django/db/models/sql/query.py", line 395, in
 as_sql
     self.pre_sql_setup()
   File "/tippit/django-
 projects/django/Django-1.1/django/db/models/sql/query.py", line 589, in
 pre_sql_setup
     self.fill_related_selections()
   File "/tippit/django-
 projects/django/Django-1.1/django/db/models/sql/query.py", line 1401, in
 fill_related_selections
     ())
 TypeError: update() takes exactly one argument (2 given)
 }}}






 A patch has been attached applied against changeset 11475.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/11764>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to