From e84008fe51a99a57a1b6ad5d45433abc8bd4fe65 Mon Sep 17 00:00:00 2001 From: Wayne Witzel III Date: Thu, 31 Mar 2016 09:58:05 -0400 Subject: [PATCH] use len instead of count to take advantage of cache --- awx/main/migrations/_rbac.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/main/migrations/_rbac.py b/awx/main/migrations/_rbac.py index 77b1f5e2b8..23b4153b7c 100644 --- a/awx/main/migrations/_rbac.py +++ b/awx/main/migrations/_rbac.py @@ -238,7 +238,7 @@ def migrate_projects(apps, schema_editor): original_project_name = project.name project_orgs = project.deprecated_organizations.distinct().all() - if project_orgs.count() > 1: + if len(project_orgs) > 1: first_org = None for org in project_orgs: if first_org is None: