Skip to content

Commit c04e56a

Browse files
committed
remove ArrayField workaround
1 parent e8832e2 commit c04e56a

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
@@ -1,7 +1,7 @@
11
import json
22

33
from django.core import checks, exceptions
4-
from django.db.models import DecimalField, Field, Func, IntegerField, Transform, Value
4+
from django.db.models import Field, Func, IntegerField, Transform, Value
55
from django.db.models.fields.mixins import CheckFieldDefaultMixin
66
from django.db.models.lookups import Exact, FieldGetDbPrepValueMixin, In, Lookup
77
from django.utils.translation import gettext_lazy as _
@@ -127,10 +127,6 @@ def db_type(self, connection):
127127

128128
def get_db_prep_value(self, value, connection, prepared=False):
129129
if isinstance(value, list | tuple):
130-
# Workaround for https://code.djangoproject.com/ticket/35982
131-
# (fixed in Django 5.2).
132-
if isinstance(self.base_field, DecimalField):
133-
return [self.base_field.get_db_prep_save(i, connection) for i in value]
134130
return [self.base_field.get_db_prep_value(i, connection, prepared=False) for i in value]
135131
return value
136132

0 commit comments

Comments
 (0)