basestring to six.string_types for Python 3

This commit is contained in:
cclauss
2018-02-09 16:28:36 +01:00
parent ce9cb24995
commit c371b869dc
11 changed files with 43 additions and 30 deletions

View File

@@ -74,7 +74,7 @@ class JSONField(upstream_JSONField):
class JSONBField(upstream_JSONBField):
def get_prep_lookup(self, lookup_type, value):
if isinstance(value, basestring) and value == "null":
if isinstance(value, six.string_types) and value == "null":
return 'null'
return super(JSONBField, self).get_prep_lookup(lookup_type, value)