diff options
| author | Ramiro Morales <cramm0@gmail.com> | 2010-11-14 23:21:39 +0000 |
|---|---|---|
| committer | Ramiro Morales <cramm0@gmail.com> | 2010-11-14 23:21:39 +0000 |
| commit | b6ec268e23c5b8e90ed3c3db3e220deca6eee8cc (patch) | |
| tree | a52467603a553301145fbea48b1f0d5b5ba449fd /django/utils/itercompat.py | |
| parent | 0324151bece5ab413250ada14428e41b6b59bf0b (diff) | |
Fiexed #3055 -- Validate that models target of a GenericRelation have a GenericForeignKey field.
Thanks jason for diagnosing the problem and Marcos Moyano for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14563 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/utils/itercompat.py')
| -rw-r--r-- | django/utils/itercompat.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/django/utils/itercompat.py b/django/utils/itercompat.py index ab27c3ee01..d4ff2503c7 100644 --- a/django/utils/itercompat.py +++ b/django/utils/itercompat.py @@ -37,3 +37,9 @@ def all(iterable): if not item: return False return True + +def any(iterable): + for item in iterable: + if item: + return True + return False |
