mirror of
https://github.com/django/django.git
synced 2025-10-25 06:36:07 +00:00
[1.8.x] 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.
Backport of 32d4db66b9 from master
This commit is contained in:
@@ -43,7 +43,7 @@ class MyAutoField(models.CharField):
|
||||
value = MyWrapper(value)
|
||||
return value
|
||||
|
||||
def from_db_value(self, value, connection, context):
|
||||
def from_db_value(self, value, expression, connection, context):
|
||||
if not value:
|
||||
return
|
||||
return MyWrapper(value)
|
||||
|
||||
Reference in New Issue
Block a user