Skip to content

Commit

Permalink
Merge pull request #1838 from laws-africa/registry-court
Browse files Browse the repository at this point in the history
Make registry court non nullable
  • Loading branch information
actlikewill authored Jun 4, 2024
2 parents 6d35072 + aa17a6e commit 9398ee8
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
32 changes: 32 additions & 0 deletions peachjam/migrations/0137_registry_court.py
Original file line number Diff line number Diff line change
@@ -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",
),
),
]
2 changes: 1 addition & 1 deletion peachjam/models/judgment.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
)
Expand Down

0 comments on commit 9398ee8

Please sign in to comment.