From 9bb776c25f22d8947a69efcdc68858b7e7c0efb4 Mon Sep 17 00:00:00 2001 From: Pawan Kumar Date: Wed, 4 Jan 2023 18:23:52 +0530 Subject: [PATCH] fixed TypeError: from_db_value() missing 1 required positional argument: 'context' --- geoposition/fields.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geoposition/fields.py b/geoposition/fields.py index 32aa88c..d9dbf3b 100644 --- a/geoposition/fields.py +++ b/geoposition/fields.py @@ -41,7 +41,7 @@ def to_python(self, value): except decimal.InvalidOperation: return None - def from_db_value(self, value, expression, connection, context): + def from_db_value(self, value, expression, connection, context=None): return self.to_python(value) def get_prep_value(self, value):