mirror of
https://github.com/django/django.git
synced 2025-10-24 22:26:08 +00:00
[1.5.x] Fixed #20278 -- ensured .get() exceptions do not recurse infinitely
A regression caused byd5b93d3281made .get() error reporting recurse infinitely on certain rare conditions. Fixed this by not trying to print the given lookup kwargs. Backpatch of266c0bb23e
This commit is contained in:
@@ -18,3 +18,11 @@ class Article(models.Model):
|
||||
|
||||
def __str__(self):
|
||||
return self.headline
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class SelfRef(models.Model):
|
||||
selfref = models.ForeignKey('self', null=True, blank=True,
|
||||
related_name='+')
|
||||
|
||||
def __str__(self):
|
||||
return SelfRef.objects.get(selfref=self).pk
|
||||
|
||||
Reference in New Issue
Block a user