mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #15040 - Boolean fields return 0 and 1 when loaded through select_related
Thanks to homm for the report and ramiro for the patch.
This commit is contained in:
@@ -66,6 +66,11 @@ class BooleanModel(models.Model):
|
||||
bfield = models.BooleanField()
|
||||
string = models.CharField(max_length=10, default='abc')
|
||||
|
||||
class FksToBooleans(models.Model):
|
||||
"""Model wih FKs to models with {Null,}BooleanField's, #15040"""
|
||||
bf = models.ForeignKey(BooleanModel)
|
||||
nbf = models.ForeignKey(NullBooleanModel)
|
||||
|
||||
class RenamedField(models.Model):
|
||||
modelname = models.IntegerField(name="fieldname", choices=((1,'One'),))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user