      null_field = models.IntegerField(null=True)
      default_field = models.IntegerField(default=0)
      descriptive_field = models.IntegerField(help_text='Some help text', verbose_name='A label')
      choices_field = models.CharField(max_length=100, choices=COLOR_CHOICES)
  
  
  class ChoicesModel(models.Model):
      choices_field_with_nonstandard_args = models.DecimalField(max_digits=3, decimal_places=1, choices=DECIMAL_CHOICES, verbose_name='A label')
 
</s> remove     if isinstance(model_field, models.TextField) or (postgres_fields and isinstance(model_field, postgres_fields.JSONField)):
 </s> add     if isinstance(model_field, models.TextField) and not model_field.choices or \
            (postgres_fields and isinstance(model_field, postgres_fields.JSONField)):
    text_choices_field = models.TextField(choices=COLOR_CHOICES)
      null_field = models.IntegerField(null=True)
      default_field = models.IntegerField(default=0)
      descriptive_field = models.IntegerField(help_text='Some help text', verbose_name='A label')
      choices_field = models.CharField(max_length=100, choices=COLOR_CHOICES)
    text_choices_field = models.TextField(choices=COLOR_CHOICES)
  
  
  class ChoicesModel(models.Model):
      choices_field_with_nonstandard_args = models.DecimalField(max_digits=3, decimal_places=1, choices=DECIMAL_CHOICES, verbose_name='A label')
keep keep keep add keep keep keep keep
 Changed default widget for TextField with choices to select (#6892) 
tests/test_model_serializer.py