Drop output_prefix_override and use show_testcases
This commit is contained in:
parent
97d0239963
commit
8f046c59c1
8 changed files with 61 additions and 16 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue