From fece70061976b3c019629968ad4ec13839b93c06 Mon Sep 17 00:00:00 2001 From: Wilson Gaturu Date: Fri, 24 May 2024 15:50:33 +0300 Subject: [PATCH] removes orderoutcome model --- .../migrations/0134_remove_order_outcome.py | 20 +++++++++++++++++++ peachjam/models/judgment.py | 20 ------------------- peachjam/translation.py | 6 ------ 3 files changed, 20 insertions(+), 26 deletions(-) create mode 100644 peachjam/migrations/0134_remove_order_outcome.py diff --git a/peachjam/migrations/0134_remove_order_outcome.py b/peachjam/migrations/0134_remove_order_outcome.py new file mode 100644 index 000000000..d37d1ab4c --- /dev/null +++ b/peachjam/migrations/0134_remove_order_outcome.py @@ -0,0 +1,20 @@ +# Generated by Django 3.2.21 on 2024-05-24 12:09 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ("peachjam", "0133_backfill_outcomes"), + ] + + operations = [ + migrations.RemoveField( + model_name="judgment", + name="order_outcomes", + ), + migrations.DeleteModel( + name="OrderOutcome", + ), + ] diff --git a/peachjam/models/judgment.py b/peachjam/models/judgment.py index 74ef48c3d..728e5a892 100644 --- a/peachjam/models/judgment.py +++ b/peachjam/models/judgment.py @@ -41,21 +41,6 @@ def __str__(self): return self.name -class OrderOutcome(models.Model): - name = models.CharField( - _("name"), max_length=1024, null=False, blank=False, unique=True - ) - description = models.TextField(_("description"), blank=True) - - class Meta: - ordering = ["name"] - verbose_name = _("order outcome") - verbose_name_plural = _("order outcomes") - - def __str__(self): - return self.name - - class Outcome(models.Model): name = models.CharField( _("name"), max_length=1024, null=False, blank=False, unique=True @@ -256,11 +241,6 @@ class Judgment(CoreDocument): attorneys = models.ManyToManyField( Attorney, blank=True, verbose_name=_("attorneys") ) - order_outcomes = models.ManyToManyField( - OrderOutcome, - blank=True, - related_name="judgments", - ) outcomes = models.ManyToManyField( Outcome, blank=True, diff --git a/peachjam/translation.py b/peachjam/translation.py index bbcf8a309..604c86ee7 100644 --- a/peachjam/translation.py +++ b/peachjam/translation.py @@ -7,7 +7,6 @@ CourtRegistry, DocumentNature, Label, - OrderOutcome, Outcome, Predicate, Taxonomy, @@ -44,11 +43,6 @@ class LabelTranslationOptions(TranslationOptions): fields = ("name",) -@register(OrderOutcome) -class OrderOutcomeTranslationOptions(TranslationOptions): - fields = ("name",) - - @register(Outcome) class OutcomeTranslationOptions(TranslationOptions): fields = ("name",)