Drop output_prefix_override and use show_testcases

This commit is contained in:
cuom1999 2023-08-25 18:12:53 -05:00
parent 97d0239963
commit 8f046c59c1
8 changed files with 61 additions and 16 deletions

View file

@ -109,6 +109,13 @@ class Organization(models.Model):
"Organization membership test must be Profile or primany key"
)
def delete(self, *args, **kwargs):
contests = self.contest_set
for contest in contests.all():
if contest.organizations.count() == 1:
contest.delete()
super().delete(*args, **kwargs)
def __str__(self):
return self.name