Django

Code

Changeset 8807

Show
Ignore:
Timestamp:
09/01/08 14:35:03 (3 months ago)
Author:
jacob
Message:

Fixed #8115: avoid a infiniate loop when collecting related objects for deletion.

I can't reproduce the original error leading to #8115 and the patch. However, the only harm this change could cause is to raise more CyclicDependency exceptions than strictly necessary. That's better than infinite loops, at least, and it's easier to clean up in the future when we figure out the actual fix.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/db/models/query.py

    r8724 r8807  
    9696            found = False 
    9797            for model in models: 
     98                if model in dealt_with: 
     99                    continue 
    98100                children = self.children.setdefault(model, []) 
    99101                if len([c for c in children if c not in dealt_with]) == 0: