]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/models/utils.py
Migrate to Django 1.6
[osqa.git] / forum / models / utils.py
index ecbe038c15072b4c2c4619ac4d375bd54f2196de..5a1912c818b1fd12616b8ade891470ba973c7453 100644 (file)
@@ -81,7 +81,7 @@ class PickledObjectField(models.Field):
                     raise
         return value
 
-    def get_db_prep_value(self, value):
+    def get_db_prep_value(self, value, connection, prepared=False):
         if value is not None and not isinstance(value, PickledObject):
             if type(value).__name__ in self.markable_types and not (isinstance(value, basestring) and len(value
                                                                                                           ) > MAX_MARKABLE_STRING_LENGTH):
@@ -122,3 +122,7 @@ class KeyValue(BaseModel):
         except:
             return None
 
+    @classmethod
+    def value_to_list_on_cache_query(cls):
+        return 'key'
+