Skip to content

Commit 11b6633

Browse files
committed
adding self reference PR
1 parent cc34fb8 commit 11b6633

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

readthedocs/core/signals.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ def delete_projects_and_organizations(sender, instance, *args, **kwargs):
8181
# Here we count the owner list from the projects that the user own
8282
# Then exclude the projects where there are more than one owner
8383
# Add annotate before filter
84+
# https://github.com/rtfd/readthedocs.org/pull/4577
8485
# https://docs.djangoproject.com/en/2.1/topics/db/aggregation/#order-of-annotate-and-filter-clauses # noqa
8586
projects = (Project.objects.annotate(num_users=Count('users')).filter(users=instance.id)
8687
.exclude(num_users__gt=1))

0 commit comments

Comments
 (0)