Skip to content

Commit 14785e5

Browse files
committed
remove ArrayField workaround
1 parent 727a0a7 commit 14785e5

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

django_mongodb_backend/fields/array.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from django.contrib.postgres.validators import ArrayMaxLengthValidator
44
from django.core import checks, exceptions
5-
from django.db.models import DecimalField, Field, Func, IntegerField, Transform, Value
5+
from django.db.models import Field, Func, IntegerField, Transform, Value
66
from django.db.models.fields.mixins import CheckFieldDefaultMixin
77
from django.db.models.lookups import Exact, FieldGetDbPrepValueMixin, In, Lookup
88
from django.utils.translation import gettext_lazy as _
@@ -113,10 +113,6 @@ def db_type(self, connection):
113113

114114
def get_db_prep_value(self, value, connection, prepared=False):
115115
if isinstance(value, list | tuple):
116-
# Workaround for https://code.djangoproject.com/ticket/35982
117-
# (fixed in Django 5.2).
118-
if isinstance(self.base_field, DecimalField):
119-
return [self.base_field.get_db_prep_save(i, connection) for i in value]
120116
return [self.base_field.get_db_prep_value(i, connection, prepared=False) for i in value]
121117
return value
122118

0 commit comments

Comments
 (0)