diff --git a/peachjam/migrations/0159_remove_legislation_old_metadata_json.py b/peachjam/migrations/0159_remove_legislation_old_metadata_json.py new file mode 100644 index 000000000..313b32b78 --- /dev/null +++ b/peachjam/migrations/0159_remove_legislation_old_metadata_json.py @@ -0,0 +1,17 @@ +# Generated by Django 4.2.15 on 2024-09-17 05:08 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ("peachjam", "0158_alter_legislation_old_metadata_json"), + ] + + operations = [ + migrations.RemoveField( + model_name="legislation", + name="old_metadata_json", + ), + ] diff --git a/peachjam/models/generic_document.py b/peachjam/models/generic_document.py index 85c011c56..6c02a359f 100644 --- a/peachjam/models/generic_document.py +++ b/peachjam/models/generic_document.py @@ -61,17 +61,12 @@ def pre_save(self): class LegislationManager(CoreDocumentManager): def get_queryset(self): # defer expensive fields - return ( - super() - .get_queryset() - .defer("old_metadata_json", "timeline_json", "commencements_json") - ) + return super().get_queryset().defer("timeline_json", "commencements_json") class Legislation(CoreDocument): objects = LegislationManager.from_queryset(CoreDocumentQuerySet)() - old_metadata_json = models.JSONField(_("metadata JSON"), null=True, blank=True) timeline_json = models.JSONField( _("timeline JSON"), null=False, blank=False, default=list )