mirror of
https://github.com/ansible/awx.git
synced 2026-06-23 15:47:49 -02:30
Fix formatting inconsistency in organization detail subquery annotation
Break the long .annotate() line across multiple lines to match the style used in mixin.py.
This commit is contained in:
@@ -96,7 +96,12 @@ class OrganizationDetail(RelatedJobsPreventDeleteMixin, RetrieveUpdateDestroyAPI
|
|||||||
output_field=IntegerField(),
|
output_field=IntegerField(),
|
||||||
)
|
)
|
||||||
direct_counts = (
|
direct_counts = (
|
||||||
Organization.objects.filter(id=org_id).annotate(users=Coalesce(member_count, 0), admins=Coalesce(admin_count, 0)).values('users', 'admins')
|
Organization.objects.filter(id=org_id)
|
||||||
|
.annotate(
|
||||||
|
users=Coalesce(member_count, 0),
|
||||||
|
admins=Coalesce(admin_count, 0),
|
||||||
|
)
|
||||||
|
.values('users', 'admins')
|
||||||
)
|
)
|
||||||
|
|
||||||
if not direct_counts:
|
if not direct_counts:
|
||||||
|
|||||||
Reference in New Issue
Block a user