Skip to content
Permalink
Browse files

Fix tests on some Django versions

The context argument is not always present, but we don't need it so loosen the requirement
  • Loading branch information
danpalmer authored and lamby committed Feb 26, 2020
1 parent 5649e21 commit 324c1a56e52226a2f6df0861f59260c0ef954cef
Showing with 1 addition and 1 deletion.
  1. +1 −1 django_enumfield/fields.py
@@ -15,7 +15,7 @@ def get_internal_type(self):
def to_python(self, value):
return self.enum.to_python(value)

def from_db_value(self, value, expression, connection, context):
def from_db_value(self, value, expression, connection, *args, **kwargs):
return self.to_python(value)

def get_prep_value(self, value):

0 comments on commit 324c1a5

Please sign in to comment.
You can’t perform that action at this time.