Refs #31926 -- Fixed reverse related identity crash on Q() limit_choices_to.
This commit is contained in:
parent
4c675523bd
commit
0ef04fdd7a
|
@ -123,7 +123,7 @@ class ForeignObjectRel(FieldCacheMixin):
|
|||
self.model,
|
||||
self.related_name,
|
||||
self.related_query_name,
|
||||
tuple(sorted(make_hashable(self.limit_choices_to))),
|
||||
make_hashable(self.limit_choices_to),
|
||||
self.parent_link,
|
||||
self.on_delete,
|
||||
self.symmetrical,
|
||||
|
|
|
@ -37,7 +37,7 @@ class Group(models.Model):
|
|||
|
||||
class Event(models.Model):
|
||||
title = models.CharField(max_length=100)
|
||||
group = models.ForeignKey(Group, models.CASCADE)
|
||||
group = models.ForeignKey(Group, models.CASCADE, limit_choices_to=models.Q())
|
||||
|
||||
|
||||
class Happening(models.Model):
|
||||
|
|
Loading…
Reference in New Issue