1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Fixed #23455 -- Accept either bytes or text for related_name, convert to text.

This commit is contained in:
Carl Meyer
2014-12-11 17:28:03 -07:00
parent d4bdddeefe
commit c72eb80d11
4 changed files with 10 additions and 6 deletions

View File

@@ -25,7 +25,7 @@ def get_foo():
class Bar(models.Model):
b = models.CharField(max_length=10)
a = models.ForeignKey(Foo, default=get_foo)
a = models.ForeignKey(Foo, default=get_foo, related_name=b'bars')
class Whiz(models.Model):