X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/4eb191fe17f9b1a56c5ba7ac19f7811d1a69ed79..fa21c2cc4d92e1f723a3b38daa2f033dbb4889e5:/forum/models/utils.py diff --git a/forum/models/utils.py b/forum/models/utils.py index ecbe038..5a1912c 100644 --- a/forum/models/utils.py +++ b/forum/models/utils.py @@ -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' +