Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#6250 closed (duplicate)

recursion loop on ForeignKey('self',edit_inline=True)

Reported by: anonymous Owned by: nobody
Component: Database layer (models, ORM) Version: dev
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

maybe it's a variant of #3288 bug. This is the case:

class Test(models.Model):
	recursion_loop = models.ForeignKey('self',edit_inline=models.TABULAR)
...many many lines...
  File "/home/visi/djtrunk/django/db/models/related.py", line 99, in get_follow
    return self.opts.get_follow(over)
  File "/home/visi/djtrunk/django/db/models/options.py", line 177, in get_follow
    fol = f.get_follow(child_override)
  File "/home/visi/djtrunk/django/db/models/related.py", line 99, in get_follow
    return self.opts.get_follow(over)
  File "/home/visi/djtrunk/django/db/models/options.py", line 177, in get_follow
    fol = f.get_follow(child_override)
  File "/home/visi/djtrunk/django/db/models/related.py", line 99, in get_follow
    return self.opts.get_follow(over)
  File "/home/visi/djtrunk/django/db/models/options.py", line 177, in get_follow
    fol = f.get_follow(child_override)
  File "/home/visi/djtrunk/django/db/models/related.py", line 99, in get_follow
    return self.opts.get_follow(over)
  File "/home/visi/djtrunk/django/db/models/options.py", line 177, in get_follow
    fol = f.get_follow(child_override)
  File "/home/visi/djtrunk/django/db/models/fields/__init__.py", line 372, in get_follow
    if override != None:
RuntimeError: maximum recursion depth exceeded in cmp

Change History (5)

comment:1 by Simon Greenhill <dev@…>, 17 years ago

Resolution: invalid
Status: newclosed

What version of Django is this? Trunk or 0.96?

comment:2 by MarcoBazzani <alfred.einstein@…>, 17 years ago

Resolution: invalid
Status: closedreopened

trunk as selected in the options
still same problem

comment:3 by Ramiro Morales, 17 years ago

Resolution: duplicate
Status: reopenedclosed

Marking this as duplicate of #3288 that has comments from core devs and has been fixed on the queryset refactor branch. This ticket has no clear instructions on how to reproduce the behavior but the symptom reported (traceback) is the same.

comment:4 by MarcoBazzani, 17 years ago

I've reported the instruction to reproduce it
it's enought to create this model

class Test(models.Model):
	recursion_loop = models.ForeignKey('self',edit_inline=models.TABULAR)

comment:5 by MarcoBazzani, 17 years ago

anyway yes it's duplicated

Note: See TracTickets for help on using tickets.
Back to Top