From 2028ecda1ecd5c46f9d11f9918471e9d37ea4804 Mon Sep 17 00:00:00 2001 From: Tadas Dailyda Date: Tue, 24 May 2016 05:06:50 -0400 Subject: [PATCH] Correct comment in admin.py --- polymorphic/admin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/polymorphic/admin.py b/polymorphic/admin.py index b50a0ad..a7f10b5 100644 --- a/polymorphic/admin.py +++ b/polymorphic/admin.py @@ -135,8 +135,8 @@ class PolymorphicParentModelAdmin(admin.ModelAdmin): # By not having this in __init__() there is less stress on import dependencies as well, # considering an advanced use cases where a plugin system scans for the child models. child_models = self.get_child_models() - # Check if child_models are provided via new syntax (iterable of models) or compatibility syntax - # (iterable of (Model, Admin). When no child_models are provided, assume new syntax. + # Check if get_child_models() returns an iterable of models (new format) or an iterable + # of (Model, Admin) (legacy format). When iterable is empty, assume the new format. self._compat_mode = len(child_models) and isinstance(child_models[0], (list, tuple)) if not self._compat_mode: self._child_models = child_models