Changes between Initial Version and Version 1 of Ticket #10205


Ignore:
Timestamp:
Feb 7, 2009, 7:32:13 AM (16 years ago)
Author:
Alex Gaynor
Comment:

cleaned up formatting.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #10205 – Description

    initial v1  
    22Let testfield be models.CharField
    33
    4 TestModel.objects.filter(testfield__in='')
    5 >>> []
    6 TestModel.objects.filter(testfield__in=())
    7 >>> []
    8 TestModel.objects.filter(testfield__in=()).delete()
    9 >>>
    10 TestModel.objects.filter(testfield__in='non-existent-entry').update(testfield='test')
    11 >>> 0
    12 TestModel.objects.filter(testfield__in='').update(testfield='test')
     4>>> TestModel.objects.filter(testfield__in='')
     5[]
     6>>> TestModel.objects.filter(testfield__in=())
     7[]
     8>>> TestModel.objects.filter(testfield__in=()).delete()
     9
     10>>> TestModel.objects.filter(testfield__in='non-existent-entry').update(testfield='test')
     110
     12>>> TestModel.objects.filter(testfield__in='').update(testfield='test')
     13
    1314as well as
    14 TestModel.objects.filter(testfield__in=()).update(testfield='test')
    15 >>> causes following trackback:
     15
     16>>> TestModel.objects.filter(testfield__in=()).update(testfield='test')
    1617}}}
     18
     19causes following trackback:
     20
     21{{{
    1722'NoneType' object has no attribute 'rowcount'
    1823File "C:\Python25\lib\site-packages\django\db\models\query.py" in update
     
    2025File "C:\Python25\lib\site-packages\django\db\models\sql\subqueries.py" in execute_sql
    2126  120.         rows = cursor.rowcount
     27}}}
Back to Top