From: Jeremy Kerr Date: Fri, 4 May 2012 01:52:23 +0000 (+0800) Subject: models: Add connection parameter for HashField.db_type. X-Git-Url: https://git.ozlabs.org/?a=commitdiff_plain;h=016c66b8eb294314235c0df004c20c88bf5ead64;p=patchwork models: Add connection parameter for HashField.db_type. This is required by django-1.4. Signed-off-by: Jeremy Kerr --- diff --git a/apps/patchwork/models.py b/apps/patchwork/models.py index 67c69ff..bbfe827 100644 --- a/apps/patchwork/models.py +++ b/apps/patchwork/models.py @@ -180,7 +180,7 @@ class HashField(models.CharField): kwargs['max_length'] = self.n_bytes super(HashField, self).__init__(*args, **kwargs) - def db_type(self): + def db_type(self, connection=None): return 'char(%d)' % self.n_bytes class PatchMbox(MIMENonMultipart):