From 333730f30e0039beb38315078b6d61d5e9bfe030 Mon Sep 17 00:00:00 2001 From: AlanCoding Date: Mon, 18 Apr 2016 10:51:27 -0400 Subject: [PATCH] make special case for no results slightly more clear --- awx/api/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/api/views.py b/awx/api/views.py index f028dcb238..a97f68d9a7 100644 --- a/awx/api/views.py +++ b/awx/api/views.py @@ -673,7 +673,7 @@ class OrganizationDetail(RetrieveUpdateDestroyAPIView): admins=Count('admin_role__members', distinct=True) ).values('users', 'admins') - if direct_counts.count() == 0: + if not direct_counts: return full_context org_counts = direct_counts[0]