Django

Code

Changeset 1516

Show
Ignore:
Timestamp:
12/01/05 00:02:45 (3 years ago)
Author:
adrian
Message:

Fixed #452 -- Fixed bug in generated DB API for models that have two ManyToManyFields? to the same related model.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/core/meta/__init__.py

    r1512 r1516  
    533533        for mod in module_list: 
    534534            for klass in mod._MODELS: 
    535                 try: 
    536                     for f in klass._meta.many_to_many: 
    537                         if f.rel and self == f.rel.to: 
    538                             rel_objs.append(RelatedObject(self, klass._meta, f)) 
    539                             raise StopIteration 
    540                 except StopIteration: 
    541                     continue 
     535                for f in klass._meta.many_to_many: 
     536                    if f.rel and self == f.rel.to: 
     537                        rel_objs.append(RelatedObject(self, klass._meta, f)) 
    542538        return rel_objs 
    543539