Changeset 7883
- Timestamp:
- 07/11/08 04:00:35 (4 months ago)
- Files:
-
- django/trunk/django/db/models/fields/__init__.py (modified) (4 diffs)
- django/trunk/tests/regressiontests/queries/models.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/db/models/fields/__init__.py
r7882 r7883 555 555 556 556 def get_db_prep_lookup(self, lookup_type, value): 557 if lookup_type == 'range':557 if lookup_type in ('range', 'in'): 558 558 value = [smart_unicode(v) for v in value] 559 559 elif lookup_type in ('exact', 'gt', 'gte', 'lt', 'lte') and hasattr(value, 'strftime'): … … 642 642 643 643 def get_db_prep_lookup(self, lookup_type, value): 644 if lookup_type == 'range':644 if lookup_type in ('range', 'in'): 645 645 value = [smart_unicode(v) for v in value] 646 646 else: … … 721 721 722 722 def get_db_prep_lookup(self, lookup_type, value): 723 if lookup_type == 'range':723 if lookup_type in ('range', 'in'): 724 724 value = [self._format(v) for v in value] 725 725 else: … … 1098 1098 else: 1099 1099 prep = smart_unicode 1100 if lookup_type == 'range':1100 if lookup_type in ('range', 'in'): 1101 1101 value = [prep(v) for v in value] 1102 1102 else: django/trunk/tests/regressiontests/queries/models.py
r7787 r7883 806 806 [] 807 807 808 Bug #7448, #7707 -- Complex objects should be converted to strings before being 809 used in lookups. 810 >>> Item.objects.filter(created__in=[time1, time2]) 811 [<Item: one>, <Item: two>] 812 808 813 """} 809 814
