Skip to content

Commit 25b829f

Browse files
authored
Fix: resolve the issue with wrong deletion of organization. (#657)
1 parent 58a32f9 commit 25b829f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

openedx/features/edly/management/commands/delete_cloud_site.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,9 @@ def delete_django_sub_org(self, sub_org):
8888
sub_org.edx_organization.delete()
8989

9090
count = EdlySubOrganization.objects.filter(edly_organization=sub_org.edly_organization).count()
91-
if count == 1:
91+
if count < 1:
9292
sub_org.edly_organization.delete()
93+
9394
sub_org.delete()
9495
logger.info(f"Successfully deleted sub organization: {sub_org}")
9596

0 commit comments

Comments
 (0)