Commits

Anonymous committed c179e18

Changing app list to show all apps if an include list isn't provided, as documented.

Comments (0)

Files changed (1)

admin_tools/utils.py

     # performance is not a bottleneck. If it is not the case then the code
     # should be optimized.
 
-    for pattern in models:
-        for item in items:
-            model, perms = item
-            if fnmatch(full_name(model), pattern) and item not in included:
-                included.append(item)
+    if len(models) == 0:
+        included = items
+    else:
+        for pattern in models:
+            for item in items:
+                model, perms = item
+                if fnmatch(full_name(model), pattern) and item not in included:
+                    included.append(item)
 
     result = included[:]
     for pattern in exclude: