1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00

Fixed #25579 -- Fixed ArrayField.get_db_prep_value() to allow complex types.

This commit is contained in:
Matt C 2016-03-15 19:23:44 +11:00 committed by Tim Graham
parent f8b23e52e8
commit e7e5d9b338
2 changed files with 1 additions and 4 deletions

View File

@ -84,7 +84,7 @@ class ArrayField(Field):
def get_db_prep_value(self, value, connection, prepared=False):
if isinstance(value, list) or isinstance(value, tuple):
return [self.base_field.get_db_prep_value(i, connection, prepared) for i in value]
return [self.base_field.get_db_prep_value(i, connection, prepared=False) for i in value]
return value
def deconstruct(self):

View File

@ -31,9 +31,6 @@ class TagField(models.SmallIntegerField):
def get_prep_value(self, value):
return value.tag_id
def get_db_prep_value(self, value, connection, prepared=False):
return self.get_prep_value(value)
class PostgreSQLModel(models.Model):
class Meta: