Changes between Initial Version and Version 1 of Ticket #10205
- Timestamp:
- Feb 7, 2009, 7:32:13 AM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #10205 – Description
initial v1 2 2 Let testfield be models.CharField 3 3 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') 11 0 12 >>> TestModel.objects.filter(testfield__in='').update(testfield='test') 13 13 14 as 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') 16 17 }}} 18 19 causes following trackback: 20 21 {{{ 17 22 'NoneType' object has no attribute 'rowcount' 18 23 File "C:\Python25\lib\site-packages\django\db\models\query.py" in update … … 20 25 File "C:\Python25\lib\site-packages\django\db\models\sql\subqueries.py" in execute_sql 21 26 120. rows = cursor.rowcount 27 }}}