From fb11e012a68f13a104b6ed2025d5163b7cfaa630 Mon Sep 17 00:00:00 2001 From: Jacob Rief Date: Sat, 9 May 2020 20:22:56 +0200 Subject: [PATCH] drop support for Django<2 --- shop/models/fields.py | 2 +- shop/money/fields.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/shop/models/fields.py b/shop/models/fields.py index 0acc0c45e..c702c7a30 100644 --- a/shop/models/fields.py +++ b/shop/models/fields.py @@ -111,7 +111,7 @@ def deconstruct(self): kwargs['default'] = kwargs['default'].value return name, path, args, kwargs - def from_db_value(self, value, expression, connection, context=None): + def from_db_value(self, value, expression, connection): try: return self.enum_type(value) except ValueError: diff --git a/shop/money/fields.py b/shop/money/fields.py index 48ac53c93..39f1d325c 100644 --- a/shop/money/fields.py +++ b/shop/money/fields.py @@ -98,7 +98,7 @@ def get_prep_value(self, value): value = super(models.DecimalField, self).get_prep_value(value) return super(MoneyField, self).to_python(value) - def from_db_value(self, value, expression, connection, context=None): + def from_db_value(self, value, expression, connection): if value is None: return if isinstance(value, float):