diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py index fd6969cd3d..5069a491e8 100644 --- a/django/db/models/fields/__init__.py +++ b/django/db/models/fields/__init__.py @@ -1721,9 +1721,11 @@ class DecimalField(Field): ) return decimal_value - def get_db_prep_save(self, value, connection): + def get_db_prep_value(self, value, connection, prepared=False): + if not prepared: + value = self.get_prep_value(value) return connection.ops.adapt_decimalfield_value( - self.to_python(value), self.max_digits, self.decimal_places + value, self.max_digits, self.decimal_places ) def get_prep_value(self, value):