mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Refs #23919 -- Removed six.<various>_types usage
Thanks Tim Graham and Simon Charette for the reviews.
This commit is contained in:
@@ -2,7 +2,6 @@ import random
|
||||
import string
|
||||
|
||||
from django.db import models
|
||||
from django.utils import six
|
||||
|
||||
|
||||
class MyWrapper(object):
|
||||
@@ -50,12 +49,12 @@ class MyAutoField(models.CharField):
|
||||
if not value:
|
||||
return
|
||||
if isinstance(value, MyWrapper):
|
||||
return six.text_type(value)
|
||||
return str(value)
|
||||
return value
|
||||
|
||||
def get_db_prep_value(self, value, connection, prepared=False):
|
||||
if not value:
|
||||
return
|
||||
if isinstance(value, MyWrapper):
|
||||
return six.text_type(value)
|
||||
return str(value)
|
||||
return value
|
||||
|
||||
Reference in New Issue
Block a user