mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 17:37:37 -02:30
use len instead of count to take advantage of cache
This commit is contained in:
@@ -238,7 +238,7 @@ def migrate_projects(apps, schema_editor):
|
|||||||
original_project_name = project.name
|
original_project_name = project.name
|
||||||
project_orgs = project.deprecated_organizations.distinct().all()
|
project_orgs = project.deprecated_organizations.distinct().all()
|
||||||
|
|
||||||
if project_orgs.count() > 1:
|
if len(project_orgs) > 1:
|
||||||
first_org = None
|
first_org = None
|
||||||
for org in project_orgs:
|
for org in project_orgs:
|
||||||
if first_org is None:
|
if first_org is None:
|
||||||
|
|||||||
Reference in New Issue
Block a user