mirror of
https://github.com/django/django.git
synced 2025-11-25 05:04:26 +00:00
Fixed #23455 -- Accept either bytes or text for related_name, convert to text.
This commit is contained in:
parent
d4bdddeefe
commit
c72eb80d11
4 changed files with 10 additions and 6 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue