new_contents: # Generated by Django 2.2.9 on 2019-12-19 17:44
  
  from django.db import migrations
  
  
  def delete_courts_without_cases(apps, schema_editor):
      CaseCourt = apps.get_model('main', 'CaseCourt')
      CaseCourt.objects.filter(cases__isnull=True).delete()
  
  
  class Migration(migrations.Migration):
  
      dependencies = [
          ('main', '0013_auto_20191219_1734'),
      ]
  
      operations = [
          migrations.RunPython(delete_courts_without_cases),
      ]
  
subject: Delete courts with no cases.