Commits

Waldemar Kornewald committed 5a91b33

fixed get_db_prep_lookup for ListField (required for startswith/contains/endswith)

Comments (0)

Files changed (1)

djangotoolbox/fields.py

         return self._convert(self.item_field.get_db_prep_save,
                              value, connection=connection)
 
-    # TODO/XXX: Remove this once we have a cleaner solution
     def get_db_prep_lookup(self, lookup_type, value, connection, prepared=False):
+        # TODO/XXX: Remove as_lookup_value() once we have a cleaner solution
+        # for dot-notation queries
         if hasattr(value, 'as_lookup_value'):
             value = value.as_lookup_value(self, lookup_type, connection)
-        return value
+
+        return self.item_field.get_db_prep_lookup(lookup_type, value,
+            connection=connection, prepared=prepared)
 
     def validate(self, values, model_instance):
         try: