summaryrefslogtreecommitdiff
path: root/tests/from_db_value
diff options
context:
space:
mode:
authorMarc Tamlyn <marc.tamlyn@gmail.com>2015-02-20 10:53:59 +0000
committerMarc Tamlyn <marc.tamlyn@gmail.com>2015-02-20 11:35:52 +0000
commit32d4db66b999cde6776d4be7f71528dab94916cc (patch)
treec952a37b99695ebaebb868db7647849e3eff5b8b /tests/from_db_value
parent4755f8fc25331c739a6f932cc8aba0cc9e62e352 (diff)
downloaddjango-32d4db66b999cde6776d4be7f71528dab94916cc.tar.gz
Update converters to take a consistent set of parameters.
As suggested by Anssi. This has the slightly strange side effect of passing the expression to Expression.convert_value has the expression passed back to it, but it allows more complex patterns of expressions.
Diffstat (limited to 'tests/from_db_value')
-rw-r--r--tests/from_db_value/models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/from_db_value/models.py b/tests/from_db_value/models.py
index 6a06c832ea..aa62b1f567 100644
--- a/tests/from_db_value/models.py
+++ b/tests/from_db_value/models.py
@@ -18,7 +18,7 @@ class CashField(models.DecimalField):
kwargs['decimal_places'] = 2
super(CashField, self).__init__(**kwargs)
- def from_db_value(self, value, connection, context):
+ def from_db_value(self, value, expression, connection, context):
cash = Cash(value)
cash.vendor = connection.vendor
return cash