diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2005-12-01 06:02:45 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2005-12-01 06:02:45 +0000 |
| commit | a58dc0dbbdb4d482d26650f4a72ffb08ef1184cf (patch) | |
| tree | abf1d2b68ef37ba6992595d72f102db6e3a872f8 | |
| parent | fa9cbe5ea01cbb82efdb2780c8381189b294f39c (diff) | |
Fixed #452 -- Fixed bug in generated DB API for models that have two ManyToManyFields to the same related model.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1516 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/core/meta/__init__.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/django/core/meta/__init__.py b/django/core/meta/__init__.py index de0a0abb6a..1d58201b28 100644 --- a/django/core/meta/__init__.py +++ b/django/core/meta/__init__.py @@ -532,13 +532,9 @@ class Options: rel_objs = [] for mod in module_list: for klass in mod._MODELS: - try: - for f in klass._meta.many_to_many: - if f.rel and self == f.rel.to: - rel_objs.append(RelatedObject(self, klass._meta, f)) - raise StopIteration - except StopIteration: - continue + for f in klass._meta.many_to_many: + if f.rel and self == f.rel.to: + rel_objs.append(RelatedObject(self, klass._meta, f)) return rel_objs def get_ordered_objects(self): |
