diff --git a/peachjam/migrations/0137_registry_court.py b/peachjam/migrations/0137_registry_court.py new file mode 100644 index 000000000..226f8dfcf --- /dev/null +++ b/peachjam/migrations/0137_registry_court.py @@ -0,0 +1,32 @@ +# Generated by Django 3.2.21 on 2024-06-04 09:53 + +import django.db.models.deletion +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("peachjam", "0136_casehistory"), + ] + + operations = [ + migrations.AlterModelOptions( + name="casehistory", + options={ + "ordering": ["-date"], + "verbose_name": "case history", + "verbose_name_plural": "case histories", + }, + ), + migrations.AlterField( + model_name="courtregistry", + name="court", + field=models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, + related_name="registries", + to="peachjam.court", + verbose_name="court", + ), + ), + ] diff --git a/peachjam/models/judgment.py b/peachjam/models/judgment.py index 14522f27c..179d43371 100644 --- a/peachjam/models/judgment.py +++ b/peachjam/models/judgment.py @@ -169,7 +169,7 @@ class CourtRegistry(models.Model): court = models.ForeignKey( Court, on_delete=models.CASCADE, - null=True, + null=False, related_name="registries", verbose_name=_("court"), )