orcasgit/django-fernet-fields

Deprecation warning for 'context' param in from_db_value()

Closed this issue · 1 comments

Just a heads up that the following has started showing up:

django.utils.deprecation.RemovedInDjango30Warning: Remove the context parameter from EncryptedTextField.from_db_value(). Support for it will be removed in Django 3.0.

It seems to be referring to this code, which fortunately doesn't actually use that param:

def from_db_value(self, value, expression, connection, context):
if value is not None:
value = bytes(value)
return self.to_python(force_text(self.fernet.decrypt(value)))

Thank you for this very useful library!

brad commented

Thanks for the report, this was fixed in #12