1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

Fixed #21612 -- Made QuerySet.update() respect to_field

This commit is contained in:
Karen Tracey
2014-11-15 14:36:41 -05:00
committed by Tim Graham
parent de912495ab
commit dec93d8991
3 changed files with 24 additions and 3 deletions

View File

@@ -42,3 +42,11 @@ class C(models.Model):
class D(C):
a = models.ForeignKey(A)
class Foo(models.Model):
target = models.CharField(max_length=10, unique=True)
class Bar(models.Model):
foo = models.ForeignKey(Foo, to_field='target')