Update signature of get_db_value to avoid deprecated context argument
@@ -79,7 +79,7 @@ class UppercaseCharField(CharField):
cls, name, **kwargs)
setattr(cls, self.name, Creator(self))
- def from_db_value(self, value, expression, connection, context):
+ def from_db_value(self, value, *args, **kwargs):
return self.to_python(value)
def to_python(self, value):
@@ -110,7 +110,7 @@ class NullCharField(CharField):
super().contribute_to_class(cls, name, **kwargs)
setattr(cls, self.name, Creator(self))
- def from_db_value(self, value, expression, connection, context):
+ def from_db_value(self, value, *args, **kwargs):
value = self.to_python(value)
# If the value was stored as null, return empty string instead
return value if value is not None else ''
